結果

問題 No.2811 Calculation Within Sequence
ユーザー anonymouslyanonymously
提出日時 2024-07-19 21:33:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 316 ms / 2,000 ms
コード長 290 bytes
コンパイル時間 453 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 43,964 KB
最終ジャッジ日時 2024-07-19 21:33:55
合計ジャッジ時間 10,764 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,752 KB
testcase_01 AC 31 ms
10,752 KB
testcase_02 AC 29 ms
10,752 KB
testcase_03 AC 277 ms
43,124 KB
testcase_04 AC 267 ms
43,156 KB
testcase_05 AC 273 ms
40,972 KB
testcase_06 AC 301 ms
41,100 KB
testcase_07 AC 269 ms
43,248 KB
testcase_08 AC 269 ms
41,064 KB
testcase_09 AC 313 ms
40,968 KB
testcase_10 AC 316 ms
40,968 KB
testcase_11 AC 268 ms
43,124 KB
testcase_12 AC 273 ms
40,972 KB
testcase_13 AC 275 ms
41,348 KB
testcase_14 AC 271 ms
41,192 KB
testcase_15 AC 298 ms
43,332 KB
testcase_16 AC 287 ms
40,980 KB
testcase_17 AC 278 ms
41,256 KB
testcase_18 AC 275 ms
41,196 KB
testcase_19 AC 293 ms
43,252 KB
testcase_20 AC 266 ms
40,908 KB
testcase_21 AC 269 ms
41,336 KB
testcase_22 AC 267 ms
41,380 KB
testcase_23 AC 283 ms
43,964 KB
testcase_24 AC 192 ms
32,100 KB
testcase_25 AC 74 ms
19,068 KB
testcase_26 AC 82 ms
18,356 KB
testcase_27 AC 173 ms
30,100 KB
testcase_28 AC 50 ms
14,564 KB
testcase_29 AC 138 ms
24,252 KB
testcase_30 AC 146 ms
29,736 KB
testcase_31 AC 143 ms
30,840 KB
testcase_32 AC 62 ms
15,952 KB
testcase_33 AC 145 ms
26,236 KB
testcase_34 AC 183 ms
32,192 KB
testcase_35 AC 101 ms
20,992 KB
testcase_36 AC 148 ms
25,884 KB
testcase_37 AC 111 ms
20,924 KB
testcase_38 AC 125 ms
26,132 KB
testcase_39 AC 131 ms
24,396 KB
testcase_40 AC 146 ms
31,824 KB
testcase_41 AC 171 ms
30,400 KB
testcase_42 AC 107 ms
22,000 KB
testcase_43 AC 119 ms
25,132 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import gcd
a, b = map(int, input().split())
T = [int(t) for t in input().split()]
gcdT = T[0]
for i in range(1, a):
    gcdT = gcd(gcdT, T[i])
S = [int(s) for s in input().split()]
gcdS = S[0]
for j in range(1, b):
    gcdS = gcd(gcdS, S[j])
print("No" if gcdS % gcdT else "Yes")
0