Buggy python submission (verdict: Runtime Error):
#!/usr/bin/python3
# abc060_b
"""
Choose Integers
"""

import math  # greatest common divisor, 最大公約数
test = False

def lcm(x, y):
    """
    最小公倍数 least common multiple
    """
    return (x * y) // math.gcd(x, y)

def answer():
    """
    Aの倍数の中に条件を満たすものがあるか調べる。
    """
    A, B, C = map(int, input().split())
    upper_limit = int(lcm(A, B) / A)
    if test:
        print(lcm(A, B), upper_limit)

    for i in range(1, upper_limit+1):
        if (A * i) % B == C:
            if test:
                print(A * i)
            return 'YES'
    return 'NO'


def main():
    """
    main関数
    """
    print(answer())


if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin/python3
# abc060_b
"""
Choose Integers
"""

test = False


def answer():
    """
    Aの倍数の中に条件を満たすものがあるか調べる。
    """
    A, B, C = map(int, input().split())

    for i in range(1, A*B+1):
        if (A * i) % B == C:
            if test:
                print(A * i)
            return 'YES'
    return 'NO'


def main():
    """
    main関数
    """
    print(answer())


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/python3
# abc060_b
"""
Choose Integers
"""

from math import gcd  # greatest common divisor, 最大公約数
test = False

def lcm(x, y):
    """
    最小公倍数 least common multiple
    """
    return (x * y) // gcd(x, y)

def answer():
    """
    Aの倍数の中に条件を満たすものがあるか調べる。
    """
    A, B, C = map(int, input().split())
    upper_limit = int(lcm(A, B) / A)
    if test:
        print(lcm(A, B), upper_limit)

    for i in range(1, upper_limit+1):
        if (A * i) % B == C:
            if test:
                print(A * i)
            return 'YES'
    return 'NO'


def main():
    """
    main関数
    """
    print(answer())


if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin/python3
# abc060_b
"""
Choose Integers
"""

test = False


def answer():
    """
    Aの倍数の中に条件を満たすものがあるか調べる。
    """
    A, B, C = map(int, input().split())

    for i in range(1, A*B+1):
        if (A * i) % B == C:
            if test:
                print(A * i)
            return 'YES'
    return 'NO'


def main():
    """
    main関数
    """
    print(answer())


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/python3
# abc060_b
"""
Choose Integers
"""

from math import gcd  # greatest common divisor, 最大公約数
test = False

def lcm(x, y):
    """
    最小公倍数 least common multiple
    """
    return (x * y) // gcd(x, y)

def answer():
    """
    Aの倍数の中に条件を満たすものがあるか調べる。
    """
    A, B, C = map(int, input().split())
    upper_limit = int(lcm(A, B) / A)
    if test:
        print(lcm(A, B), upper_limit)

    for i in range(1, upper_limit+1):
        if (A * i) % B == C:
            print(A * i)
            return 'YES'
    return 'NO'


def main():
    """
    main関数
    """
    print(answer())


if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin/python3
# abc060_b
"""
Choose Integers
"""

test = False


def answer():
    """
    Aの倍数の中に条件を満たすものがあるか調べる。
    """
    A, B, C = map(int, input().split())

    for i in range(1, A*B+1):
        if (A * i) % B == C:
            if test:
                print(A * i)
            return 'YES'
    return 'NO'


def main():
    """
    main関数
    """
    print(answer())


if __name__ == '__main__':
    main()