Buggy python submission (verdict: Runtime Error):
#! /usr/bin/env python
import math

while True:
    inp = input()
    if inp == '0': break

    num = math.factorial(int(inp))
    cnt = 0
    while True:
        if num % 10 == 0:
            cnt = cnt + 1
            num = num / 10
        else:
            break

    print(cnt)

Fixed submission:
while True:
    inp = input()
    if inp == '0': break

    num = 1
    for i in range(1, int(inp)+1):
        num = num * i

    cnt = 0
    strnum = str(num)
    while True:
        if strnum[-1] == '0':
            cnt = cnt + 1
            strnum = strnum[:-1]
        else:
            break

    print(cnt)

Buggy python submission (verdict: Runtime Error):
import math

while True:
    inp = input()
    if inp == '0': break

    num = math.factorial(int(inp))
    cnt = 0
    while True:
        if num % 10 == 0:
            cnt = cnt + 1
            num = num / 10
        else:
            break

    print(cnt)

Fixed submission:
while True:
    inp = input()
    if inp == '0': break

    num = 1
    for i in range(1, int(inp)+1):
        num = num * i

    cnt = 0
    strnum = str(num)
    while True:
        if strnum[-1] == '0':
            cnt = cnt + 1
            strnum = strnum[:-1]
        else:
            break

    print(cnt)

Buggy python submission (verdict: Runtime Error):
def factorial(n):
    res = 1
    for i in range(1, n+1):
        res = res * i
    return res

while True:
    inp = input()
    if inp == '0': break

    num = factorial(int(inp))
    cnt = 0
    while True:
        if num % 10 == 0:
            cnt = cnt + 1
            num = int(num / 10)
        else:
            break

    print(cnt)

Fixed submission:
while True:
    inp = input()
    if inp == '0': break

    num = 1
    for i in range(1, int(inp)+1):
        num = num * i

    cnt = 0
    strnum = str(num)
    while True:
        if strnum[-1] == '0':
            cnt = cnt + 1
            strnum = strnum[:-1]
        else:
            break

    print(cnt)

Buggy python submission (verdict: Runtime Error):
def factorial(n):
    res = 1
    for i in range(1, n+1):
        res = res * i
    return res

while True:
    inp = input()
    if inp == '0': break

    num = factorial(int(inp))
    cnt = 0
    while True:
        if num % 10 == 0:
            cnt = cnt + 1
            num = int(num / 10)
        else:
            break

    print(cnt)

Fixed submission:
while True:
    inp = input()
    if inp == '0': break

    num = 1
    for i in range(1, int(inp)+1):
        num = num * i

    cnt = 0
    strnum = str(num)
    while True:
        if strnum[-1] == '0':
            cnt = cnt + 1
            strnum = strnum[:-1]
        else:
            break

    print(cnt)

Buggy python submission (verdict: Runtime Error):
while True:
    inp = input()
    if inp == '0': break

    num = 1
    for i in range(1, int(inp)):
        num = num * i

    cnt = 0
    while True:
        if num % 10 == 0:
            cnt = cnt + 1
            num = int(num / 10)
        else:
            break

    print(cnt)

Fixed submission:
while True:
    inp = input()
    if inp == '0': break

    num = 1
    for i in range(1, int(inp)+1):
        num = num * i

    cnt = 0
    strnum = str(num)
    while True:
        if strnum[-1] == '0':
            cnt = cnt + 1
            strnum = strnum[:-1]
        else:
            break

    print(cnt)

Buggy python submission (verdict: Runtime Error):
while True:
    inp = input()
    if inp == '0': break

    num = 1
    for i in range(1, int(inp)+1):
        num = num * i

    cnt = 0
    strnum = str(num)
    while True:
        if strnum[-1] == '0':
            cnt = cnt + 1
            strnum = strnum[:-1]
        else:
            break

    print(cnt)

Fixed submission:
while True:
    inp = input()
    if inp == '0': break

    num = 1
    for i in range(1, int(inp)+1):
        num = num * i

    cnt = 0
    strnum = str(num)
    while True:
        if strnum[-1] == '0':
            cnt = cnt + 1
            strnum = strnum[:-1]
        else:
            break

    print(cnt)