Cod sursa(job #2086692)
Utilizator | Data | 12 decembrie 2017 12:53:41 | |
---|---|---|---|
Problema | Next | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.24 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream f("next.in");
ofstream g("next.out");
int main()
{
int n,d,ok=0;
f>>n>>d;
while(ok==0)
{
if(n%d==0){g<<n;ok=1;}
n++;
}
return 0;
}