結果

問題 No.882 約数倍数
ユーザー SegeSege
提出日時 2019-09-15 00:19:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 260 bytes
コンパイル時間 252 ms
コンパイル使用メモリ 10,616 KB
実行使用メモリ 7,960 KB
最終ジャッジ日時 2023-09-21 03:58:12
合計ジャッジ時間 1,169 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 15 ms
7,864 KB
testcase_03 WA -
testcase_04 AC 15 ms
7,836 KB
testcase_05 WA -
testcase_06 AC 15 ms
7,752 KB
testcase_07 AC 15 ms
7,828 KB
testcase_08 WA -
testcase_09 AC 15 ms
7,912 KB
testcase_10 AC 15 ms
7,868 KB
testcase_11 WA -
testcase_12 AC 15 ms
7,912 KB
testcase_13 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b=map(int,input().split())
flag=False
if (a%2)*(b%2)!=1:
    print("YES")
else:
    for i in range(3,max(a,b)+1,2):
        if a%i==0 and b%i==0:
            flag=True
            break
    if flag:
        print("YES")
    else:
        print("NO")
        
0