Cod sursa(job #42397)

Utilizator mrpopescuPopescu Mihai Tudor mrpopescu Data 29 martie 2007 09:57:30
Problema Next Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.15 kb
#include <fstream>
int main(){
std::ifstream in("next.in");
std::ofstream out("next.out");
long n,k,r;
in>>n>>k;
r=n%k;
n+=(k-r)%k
out<<n;
}