Cod sursa(job #1679913)
Utilizator | Data | 8 aprilie 2016 12:51:20 | |
---|---|---|---|
Problema | Next | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.26 kb |
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("next.in");
ofstream fout("next.out");
int n,d,sw=1;
int main()
{
fin>>n>>d;
while(sw)
{
if(n%d==0){break;sw--;}
n++;
}
fout<<n;
return 0;
}