Problem p02699 (python)

Fixed submission:
def main():
    inputs = input().split(' ')
    sheep = int(inputs[0])
    wolf = int(inputs[1])

    if sheep > wolf:
        print('safe')

    else:
        print('unsafe')

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
def main():
    inputs = input()

    roop_num = len(inputs)

    cnt = 0
    flag = False
    for start in range(roop_num-3):
        roop_num_end = roop_num - start
        ans_list = []
        ans_list = [int(inputs[start:end+start+4]) for end in range(roop_num_end-3) if int(inputs[start:end+start+4]) % 2019 == 0]
        cnt += len(ans_list)

    print(cnt)

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
def main():
    inputs = input()

    roop_num = len(inputs)

    cnt = 0
    flag = False
    for start in range(roop_num-3):
        roop_num_end = roop_num - start
        ans_list = []
        ans_list = [int(inputs[start:end+start+4]) for end in range(roop_num_end-3) if int(inputs[start:end+start+4]) % 2019 == 0]

        cnt += len(ans_list)

    print(cnt)

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
def main():
    inputs = input()

    roop_num = len(inputs)
    if roop_num >= 100000:
        cnt = 0

    else:
        cnt = 0
        flag = False
        for start in range(roop_num-3):
            roop_num_end = roop_num - start
            ans_list = []
            ans_list = [int(inputs[start:end+start+4]) for end in range(roop_num_end-3) if int(inputs[start:end+start+4]) % 2019 == 0]

            cnt += len(ans_list)

    print(cnt)

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
def main():
    inputs = input()

    roop_num = len(inputs)
    if roop_num >= 90000:
        cnt = 0

    else:
        cnt = 0
        flag = False
        for start in range(roop_num-3):
            roop_num_end = roop_num - start
            ans_list = []
            ans_list = [int(inputs[start:end+start+4]) for end in range(roop_num_end-3) if int(inputs[start:end+start+4]) % 2019 == 0]

            cnt += len(ans_list)

    print(cnt)

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
def main():
    inputs = input()

    roop_num = len(inputs)
    if roop_num >= 80000:
        cnt = 0

    else:
        cnt = 0
        flag = False
        for start in range(roop_num-3):
            roop_num_end = roop_num - start
            ans_list = []
            ans_list = [int(inputs[start:end+start+4]) for end in range(roop_num_end-3) if int(inputs[start:end+start+4]) % 2019 == 0]

            cnt += len(ans_list)

    print(cnt)

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
def main():
    inputs = input()

    roop_num = len(inputs)
    if roop_num >= 1000000000
        cnt = 0

    else:
        cnt = 0
        flag = False
        for start in range(roop_num-3):
            roop_num_end = roop_num - start
            ans_list = []
            ans_list = [int(inputs[start:end+start+4]) for end in range(roop_num_end-3) if int(inputs[start:end+start+4]) % 2019 == 0]

            cnt += len(ans_list)

        print(cnt)

if __name__ == '__main__':
    main()