Buggy python submission (verdict: Runtime Error):


if __name__ == "__main__":
    N = int(input())
    A = map(int, input().split())
    for i in A:
        if i % 2 == 0:
            if i % 3 == 0:
                ret = "APPROVED"
            elif i % 5 == 0:
                ret = "APPROVED"
            else:
                ret  = "DENIED"
                break
        else:
            continue
    print(ret)


Fixed submission:


if __name__ == "__main__":
    N = int(input())
    A = map(int, input().split())
    for i in A:
        if i % 2 ==0:
            if i % 3 != 0 and i % 5 != 0:
                    print("DENIED")
                    exit(0)
            else:
                pass
        else:
            pass
    print("APPROVED")

Buggy python submission (verdict: Runtime Error):


if __name__ == "__main__":
    N = int(input())
    A = map(int, input().split())
    for i in A:
        if i % 2 == 0:
            if i % 3 == 0 or i % 5 == 0:
                ret = "APPROVED"
            else:
                ret  = "DENIED"
                break
        else:
            continue
    print(ret)


Fixed submission:


if __name__ == "__main__":
    N = int(input())
    A = map(int, input().split())
    for i in A:
        if i % 2 ==0:
            if i % 3 != 0 and i % 5 != 0:
                    print("DENIED")
                    exit(0)
            else:
                pass
        else:
            pass
    print("APPROVED")

Buggy python submission (verdict: Runtime Error):


if __name__ == "__main__":
    N = int(input())
    A = map(int, input().split())
    for i in A:
        if i % 2 == 0:
            if i % 3 == 0 or i % 5 == 0:
                ret = "APPROVED"
            else:
                ret  = "DENIED"
                print(i)
                break
        else:
            continue
    print(ret)


Fixed submission:


if __name__ == "__main__":
    N = int(input())
    A = map(int, input().split())
    for i in A:
        if i % 2 ==0:
            if i % 3 != 0 and i % 5 != 0:
                    print("DENIED")
                    exit(0)
            else:
                pass
        else:
            pass
    print("APPROVED")

Buggy python submission (verdict: Runtime Error):


if __name__ == "__main__":
    N = int(input())
    A = map(int, input().split())
    even_ls = [i for i in A if i%2 == 0 ]
    for i in even_ls:
        if i % 3 == 0 or i % 5 == 0:
            ret = "APPROVED"
        else:
            ret  = "DENIED"
            break
    print(ret)


Fixed submission:


if __name__ == "__main__":
    N = int(input())
    A = map(int, input().split())
    for i in A:
        if i % 2 ==0:
            if i % 3 != 0 and i % 5 != 0:
                    print("DENIED")
                    exit(0)
            else:
                pass
        else:
            pass
    print("APPROVED")

Buggy python submission (verdict: Runtime Error):

if __name__ == "__main__":
    N = int(input())
    A = map(int, input().split())
    even_ls = [i for i in A if i%2 == 0 ]
    for i in even_ls:
        if i % 3 == 0 or i % 5 == 0:
            ret = "APPROVED"
        else:
            ret  = "DENIED"
            break
    print(ret)


Fixed submission:


if __name__ == "__main__":
    N = int(input())
    A = map(int, input().split())
    for i in A:
        if i % 2 ==0:
            if i % 3 != 0 and i % 5 != 0:
                    print("DENIED")
                    exit(0)
            else:
                pass
        else:
            pass
    print("APPROVED")

Buggy python submission (verdict: Runtime Error):


if __name__ == "__main__":
    N = int(input())
    A = map(int, input().split())
    even_ls = [i for i in A if i%2 == 0 ]
    for i in even_ls:
        if i % 3 == 0 or i % 5 == 0:
            ret = "APPROVED"
        else:
            ret  = "DENIED"
        break
    print(ret)


Fixed submission:


if __name__ == "__main__":
    N = int(input())
    A = map(int, input().split())
    for i in A:
        if i % 2 ==0:
            if i % 3 != 0 and i % 5 != 0:
                    print("DENIED")
                    exit(0)
            else:
                pass
        else:
            pass
    print("APPROVED")