79635388

Date: 2025-05-23 11:11:12
Score: 0.5
Natty:
Report link

The assignment f=1 has to be moved inside loop:

n = int(input())
s = 0
ld = 0

while n != 0:
    ld = n % 10
    f = 1
    for i in range(1, ld + 1):
        f = f * i
    s = s + f
    n = n // 10

print(s)
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: monblu