Pagini recente » Statistici faggot (faggot1234) | Cod sursa (job #272279) | Cod sursa (job #2013272) | Profil 131_44 | Cod sursa (job #172308)
Cod sursa(job #172308)
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define NMAX 1000000UL
int main()
{
unsigned long long n,d,m,c,r,l;
char s[NMAX+1],x[21],*end;
FILE *f=fopen("next.in","r");
freopen("next.out","w",stdout);
fscanf(f,"%s",s);
fscanf(f,"%llu",&d);
l=strlen(s);
if(l<20){
n=strtoul(s,&end,10);
c=n/d;r=n%d;
if(r) c++;
m=c*d;
}
printf("%llu",m);
return 0;
}