Cod sursa(job #574106)
Utilizator | Data | 6 aprilie 2011 20:25:07 | |
---|---|---|---|
Problema | Factorial | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.22 kb |
#include<fstream>
using namespace std;
int main()
{unsigned long long n, p;
ifstream f("fact.in");
ofstream h("fact.out");
f>>p;
if (p==0)
n=1;
else
n=4*p+1;
h<<n<<endl;
f.close();
h.close();
return 0;
}