結果

問題 No.1250 汝は倍数なりや?
ユーザー toshiro_yanagitoshiro_yanagi
提出日時 2023-07-03 20:57:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 190 ms / 1,000 ms
コード長 248 bytes
コンパイル時間 1,356 ms
コンパイル使用メモリ 87,028 KB
実行使用メモリ 101,652 KB
最終ジャッジ日時 2023-09-24 17:58:01
合計ジャッジ時間 7,711 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,328 KB
testcase_01 AC 68 ms
71,440 KB
testcase_02 AC 69 ms
71,192 KB
testcase_03 AC 70 ms
71,352 KB
testcase_04 AC 69 ms
71,160 KB
testcase_05 AC 71 ms
71,404 KB
testcase_06 AC 70 ms
71,272 KB
testcase_07 AC 68 ms
71,440 KB
testcase_08 AC 68 ms
70,992 KB
testcase_09 AC 70 ms
71,384 KB
testcase_10 AC 69 ms
71,428 KB
testcase_11 AC 68 ms
71,428 KB
testcase_12 AC 68 ms
71,100 KB
testcase_13 AC 67 ms
71,240 KB
testcase_14 AC 69 ms
71,244 KB
testcase_15 AC 67 ms
71,248 KB
testcase_16 AC 68 ms
71,224 KB
testcase_17 AC 69 ms
71,284 KB
testcase_18 AC 68 ms
71,164 KB
testcase_19 AC 68 ms
71,180 KB
testcase_20 AC 68 ms
71,300 KB
testcase_21 AC 71 ms
70,992 KB
testcase_22 AC 70 ms
71,172 KB
testcase_23 AC 74 ms
75,436 KB
testcase_24 AC 73 ms
75,424 KB
testcase_25 AC 75 ms
75,496 KB
testcase_26 AC 69 ms
71,188 KB
testcase_27 AC 72 ms
75,368 KB
testcase_28 AC 70 ms
71,264 KB
testcase_29 AC 74 ms
75,316 KB
testcase_30 AC 73 ms
75,072 KB
testcase_31 AC 73 ms
75,072 KB
testcase_32 AC 73 ms
75,492 KB
testcase_33 AC 190 ms
99,920 KB
testcase_34 AC 111 ms
91,648 KB
testcase_35 AC 137 ms
101,652 KB
testcase_36 AC 174 ms
99,548 KB
testcase_37 AC 147 ms
92,116 KB
testcase_38 AC 149 ms
93,868 KB
testcase_39 AC 112 ms
91,668 KB
testcase_40 AC 112 ms
91,644 KB
testcase_41 AC 168 ms
96,092 KB
testcase_42 AC 125 ms
86,592 KB
testcase_43 AC 190 ms
99,392 KB
testcase_44 AC 124 ms
86,688 KB
testcase_45 AC 154 ms
99,648 KB
testcase_46 AC 115 ms
82,668 KB
testcase_47 AC 121 ms
94,092 KB
testcase_48 AC 69 ms
71,252 KB
testcase_49 AC 68 ms
71,232 KB
testcase_50 AC 71 ms
71,188 KB
testcase_51 AC 71 ms
71,292 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def gcd(a, b):
    while min(a, b) > 0:
        a, b = max(a, b), min(a, b)
        a %= b
    return max(a, b)


(n, h), a = [[*map(int, input().split())] for _ in range(2)]
for ai in a:
    h //= gcd(h, abs(ai))

print("YES" if h == 1 else "NO")
0