Cod sursa(job #793165)

Utilizator symonaScheul Simona symona Data 2 octombrie 2012 01:39:34
Problema Cifra Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.23 kb
#include<fstream>
using namespace std;

int N,T,S,P;
int main()
{
    ifstream f("cifra.in");
    ofstream g("cifra.out");
    f>>N;
    for(T=1;T<=N;T++)
    S=S+T*T;
    P=P*(S+T);

    g<<S<<" "<<P;
    return 0;
}