Cod sursa(job #955115)
| Utilizator | Data | 30 mai 2013 21:13:47 | |
|---|---|---|---|
| Problema | Next | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.25 kb |
#include<iostream>
#include<fstream>
using namespace std;
int main()
{long long int n,d,i;
ifstream f("next.int");
ofstream g("next.out");
f>>n>>d;
i=n-1;
do
{i++;
if(i%d==0)
g<<i;
}
while(i%d!=0);
g.close();
f.close();
}
