Cod sursa(job #85381)
Utilizator | Data | 21 septembrie 2007 13:18:17 | |
---|---|---|---|
Problema | Next | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.24 kb |
#include<stdio.h>
#define infile "next.in"
#define outfile "next.out"
long long n,m,d,x;
int main ()
{FILE *fin=fopen(infile,"r"),*fout=fopen(outfile,"w");
fscanf(fin,"%lld %lld",&n,&d);
x=n+d-n%d;
fprintf(fout,"%lld",x);
return 0;
}