Cod sursa(job #588141)
Utilizator | Data | 7 mai 2011 00:36:25 | |
---|---|---|---|
Problema | NumMst | Scor | 20 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.26 kb |
#include<fstream>
#include<cmath>
using namespace std;
ifstream f("nummst.in");
ofstream g("nummst.out");
int main()
{int n,i,j,ok=0;
f>>n;
i=2;
while(!ok)
{
if(n%i==0)
{for(j=1;j<=i;j++)
g<<n/i<<" "; ok=1;}
i++;
}
return 0;
}