Cod sursa(job #2624987)

Utilizator tuddi69666Blidea Tudorel Alexandru tuddi69666 Data 5 iunie 2020 17:27:22
Problema Factorial Scor 0
Compilator py Status done
Runda Arhiva de probleme Marime 0.26 kb
def corect (S):
    n = 0
    for i in range (1, 12):
        temp = S//(5**i)
        n += temp
        if temp == 0:
            break
    return n


P = int(input())
temp = 5*P
while corect(temp) > P:
    temp -= 5
if corect(temp) == P:
    print (temp)