Cod sursa(job #587722)

Utilizator MciprianMMciprianM MciprianM Data 5 mai 2011 18:41:16
Problema NumMst Scor 20
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.33 kb
#include <fstream>

using namespace std;

int main(){
    int n, d ( 2 ), a;
    ifstream f ( "nummst.in" );
    ofstream g ( "nummst.out" );
    f >> n;
    while ( n % d ) ++ d;
    a = n / d;
    g << a;
    while ( -- d ) {
        g << " " << a;
    }
    g << endl;
    f.close();
    g.close();
    return 0;
}