結果

問題 No.2811 Calculation Within Sequence
ユーザー 👑 rin204rin204
提出日時 2024-07-19 21:21:26
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 209 ms / 2,000 ms
コード長 263 bytes
コンパイル時間 375 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 132,148 KB
最終ジャッジ日時 2024-07-19 21:21:35
合計ジャッジ時間 8,870 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
51,968 KB
testcase_01 AC 40 ms
52,096 KB
testcase_02 AC 40 ms
51,968 KB
testcase_03 AC 176 ms
131,212 KB
testcase_04 AC 183 ms
131,312 KB
testcase_05 AC 160 ms
131,336 KB
testcase_06 AC 180 ms
131,344 KB
testcase_07 AC 187 ms
131,340 KB
testcase_08 AC 169 ms
131,596 KB
testcase_09 AC 176 ms
131,336 KB
testcase_10 AC 177 ms
131,448 KB
testcase_11 AC 178 ms
131,588 KB
testcase_12 AC 161 ms
131,336 KB
testcase_13 AC 156 ms
131,760 KB
testcase_14 AC 160 ms
131,568 KB
testcase_15 AC 201 ms
131,200 KB
testcase_16 AC 164 ms
131,340 KB
testcase_17 AC 152 ms
131,492 KB
testcase_18 AC 195 ms
131,716 KB
testcase_19 AC 209 ms
131,384 KB
testcase_20 AC 200 ms
131,388 KB
testcase_21 AC 147 ms
131,492 KB
testcase_22 AC 145 ms
131,872 KB
testcase_23 AC 150 ms
132,148 KB
testcase_24 AC 126 ms
107,264 KB
testcase_25 AC 67 ms
79,232 KB
testcase_26 AC 77 ms
83,072 KB
testcase_27 AC 133 ms
98,432 KB
testcase_28 AC 61 ms
68,480 KB
testcase_29 AC 109 ms
99,200 KB
testcase_30 AC 121 ms
96,960 KB
testcase_31 AC 145 ms
103,936 KB
testcase_32 AC 58 ms
72,320 KB
testcase_33 AC 114 ms
99,072 KB
testcase_34 AC 110 ms
100,700 KB
testcase_35 AC 84 ms
88,064 KB
testcase_36 AC 165 ms
98,304 KB
testcase_37 AC 83 ms
93,056 KB
testcase_38 AC 99 ms
98,560 KB
testcase_39 AC 92 ms
96,512 KB
testcase_40 AC 110 ms
107,264 KB
testcase_41 AC 106 ms
98,432 KB
testcase_42 AC 77 ms
87,424 KB
testcase_43 AC 93 ms
98,560 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import gcd

a, b = map(int, input().split())
T = list(map(int, input().split()))
S = list(map(int, input().split()))

gt = 0
for t in T:
    gt = gcd(gt, t)
gs = 0
for s in S:
    gs = gcd(gs, s)

if gs % gt == 0:
    print("Yes")
else:
    print("No")
0