Cod sursa(job #277555)

Utilizator Neamtzu21Ciurea Daniel Neamtzu21 Data 11 martie 2009 19:47:29
Problema Factorial Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.36 kb
#include<iostream.h>
#include<fstream.h>

ifstream f("fact.in");
ofstream g("fact.out");

long long p, c, s;
int r;

void citire()
{
     f>>p;
     f.close();
}

main()
{
      citire();
      if(p==0) g<<'1';
      else
      {
          r=p%6;
          c=p/6;
          s=c*25+r*5;
          g<<s;
          }
      g.close();
}