⌨️

[AtCoder]ABC-060|B - Choose Integers

2022/12/28に公開

設問ページ

提出結果

def getIntMap():
    return map(int, input().split())


def main():
    a, b, c = getIntMap()

    f = False
    for i in range(b):
        if a * i % b == c:
            f = True
            break
    print('YES' if f else 'NO')


if __name__ == "__main__":
    main()

Discussion