Cod sursa(job #196460)
Utilizator | Data | 26 iunie 2008 16:37:43 | |
---|---|---|---|
Problema | Next | Scor | 0 |
Compilator | c | Status | done |
Runda | Arhiva de probleme | Marime | 0.37 kb |
#include <stdio.h>
#include <stdlib.h>
#define INFINIT 100000000
int main(int argc, char *argv[])
{
long long di=0,nr=0,k=0;
FILE *i,*o;
i=fopen("next.in","r");
o=fopen("next.out","w");
fscanf(i,"%lld\n",&nr);
fscanf(i,"%lld",&di);
for(k=nr;k<=INFINIT;k++)
{
if(k%di==0)
{
fprintf(o,"%lld",k);
break;
};
};
return 0;
}