Cod sursa(job #2612897)

Utilizator STEFAN-ZOTAZota Stefan-Daniel STEFAN-ZOTA Data 9 mai 2020 13:40:57
Problema Factorial Scor 0
Compilator py Status done
Runda Arhiva de probleme Marime 0.2 kb
f = open("fact.in", "r")
g = open("fact.out", "w")
x = int(f.readline())
if x == 0:
    g.write(1)
else:
    if (x+1) % 6 == 0:
        g.write("-1")
    else:
        g.write((x - (x + 1)//6) * 5)