Cod sursa(job #166467)

Utilizator firewizardLucian Dobre firewizard Data 28 martie 2008 00:50:20
Problema Factorial Scor 5
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.32 kb
#include <stdio.h>
long n,p,c,v[]={0,5,10,15,20,25,25,30,35,40,45,50,50,55,60,65,70,75,75,80,85,90,95,100};
int main()
{
    freopen("fact.in","r",stdin);
    freopen("fact.out","w",stdout);
    scanf("%ld",&p);
    if(p==0)printf("1");
    else
    {c=(p/23)*100+v[p%23];
    printf("%ld",c-1);}
    return 0;
}