Cod sursa(job #238289)

Utilizator DraStiKDragos Oprica DraStiK Data 1 ianuarie 2009 18:19:41
Problema Next Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.22 kb
#include <stdio.h>
int n,d;
int main ()
{
    freopen ("next.in","r",stdin);
    freopen ("next.out","w",stdout);
    int r;
    scanf ("%d%d",&n,&d);
    r=n%d;
    n+=d-r;
    printf ("%d ",n);
    return 0;
}