Cod sursa(job #1416384)

Utilizator Costin.StanciuStanciu Costin Costin.Stanciu Data 7 aprilie 2015 22:33:16
Problema Factorial Scor 0
Compilator c Status done
Runda Arhiva de probleme Marime 0.3 kb
#include <stdio.h>
#include <stdlib.h>

int main()
{
    int c, n;

    c = 0;

    freopen("fact.in", "r", stdin);
    freopen("fact.out", "w", stdout);

    scanf("%d", &n);

    while (n >= 5)
    {
        n /= 5;
        c += n;
    }

    printf("%d", c);

    return 0;
}