結果

問題 No.2811 Calculation Within Sequence
ユーザー minimumminimum
提出日時 2024-07-19 21:26:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 190 ms / 2,000 ms
コード長 269 bytes
コンパイル時間 233 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 131,900 KB
最終ジャッジ日時 2024-07-19 21:27:01
合計ジャッジ時間 8,037 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,096 KB
testcase_01 AC 38 ms
51,968 KB
testcase_02 AC 36 ms
51,840 KB
testcase_03 AC 159 ms
131,472 KB
testcase_04 AC 184 ms
131,324 KB
testcase_05 AC 156 ms
131,468 KB
testcase_06 AC 168 ms
131,488 KB
testcase_07 AC 179 ms
131,216 KB
testcase_08 AC 159 ms
131,468 KB
testcase_09 AC 162 ms
131,340 KB
testcase_10 AC 165 ms
131,596 KB
testcase_11 AC 190 ms
131,224 KB
testcase_12 AC 156 ms
131,332 KB
testcase_13 AC 147 ms
131,636 KB
testcase_14 AC 155 ms
131,440 KB
testcase_15 AC 177 ms
131,084 KB
testcase_16 AC 160 ms
131,344 KB
testcase_17 AC 138 ms
131,760 KB
testcase_18 AC 174 ms
131,336 KB
testcase_19 AC 181 ms
131,204 KB
testcase_20 AC 169 ms
131,516 KB
testcase_21 AC 147 ms
131,760 KB
testcase_22 AC 138 ms
131,432 KB
testcase_23 AC 142 ms
131,900 KB
testcase_24 AC 122 ms
107,136 KB
testcase_25 AC 64 ms
79,104 KB
testcase_26 AC 74 ms
83,072 KB
testcase_27 AC 134 ms
97,920 KB
testcase_28 AC 62 ms
68,480 KB
testcase_29 AC 104 ms
99,072 KB
testcase_30 AC 115 ms
96,968 KB
testcase_31 AC 116 ms
104,064 KB
testcase_32 AC 58 ms
72,192 KB
testcase_33 AC 113 ms
98,944 KB
testcase_34 AC 106 ms
100,304 KB
testcase_35 AC 85 ms
87,936 KB
testcase_36 AC 110 ms
98,176 KB
testcase_37 AC 81 ms
92,928 KB
testcase_38 AC 94 ms
98,688 KB
testcase_39 AC 87 ms
96,512 KB
testcase_40 AC 108 ms
107,392 KB
testcase_41 AC 100 ms
97,920 KB
testcase_42 AC 77 ms
87,424 KB
testcase_43 AC 92 ms
98,304 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import gcd


A, B = map(int, input().split())
S = list(map(int, input().split()))
T = list(map(int, input().split()))
gs, gt = S[0], T[0]
for i in S:
    gs = gcd(gs, i)
for i in T:
    gt = gcd(gt, i)


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