Cod sursa(job #1923645)

Utilizator miruna1224Floroiu Miruna miruna1224 Data 11 martie 2017 20:19:47
Problema Factorial Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.47 kb
#include <iostream>
#include <fstream>

using namespace std;

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

long long sum[1001],P,S2,S=1;
const long long N=1<<20;

int caut()
{
    long long pas=N;
    int r=0;
    while(pas!=0)
    {
        if(pas+r<=5*P && sum[pas+r]<=P)
            r+=pas;
        pas/=2;
    }
    return r;
}

int main()
{
    int n;
    in>>P;
    if(P==0)
        out<<1;
    else
        out<<5*P;
    return 0;
}