結果
問題 | No.2811 Calculation Within Sequence |
ユーザー | titia |
提出日時 | 2024-07-19 21:37:18 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 296 ms / 2,000 ms |
コード長 | 285 bytes |
コンパイル時間 | 88 ms |
コンパイル使用メモリ | 12,288 KB |
実行使用メモリ | 42,676 KB |
最終ジャッジ日時 | 2024-07-19 21:37:30 |
合計ジャッジ時間 | 10,294 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 28 ms
10,496 KB |
testcase_01 | AC | 28 ms
10,496 KB |
testcase_02 | AC | 28 ms
10,624 KB |
testcase_03 | AC | 278 ms
42,596 KB |
testcase_04 | AC | 248 ms
40,968 KB |
testcase_05 | AC | 296 ms
40,684 KB |
testcase_06 | AC | 237 ms
40,816 KB |
testcase_07 | AC | 264 ms
40,936 KB |
testcase_08 | AC | 244 ms
40,688 KB |
testcase_09 | AC | 250 ms
40,688 KB |
testcase_10 | AC | 242 ms
40,692 KB |
testcase_11 | AC | 246 ms
42,600 KB |
testcase_12 | AC | 273 ms
40,692 KB |
testcase_13 | AC | 243 ms
40,680 KB |
testcase_14 | AC | 246 ms
41,104 KB |
testcase_15 | AC | 242 ms
42,676 KB |
testcase_16 | AC | 245 ms
42,356 KB |
testcase_17 | AC | 249 ms
40,988 KB |
testcase_18 | AC | 248 ms
42,540 KB |
testcase_19 | AC | 244 ms
42,596 KB |
testcase_20 | AC | 241 ms
40,912 KB |
testcase_21 | AC | 267 ms
41,072 KB |
testcase_22 | AC | 239 ms
41,064 KB |
testcase_23 | AC | 240 ms
41,512 KB |
testcase_24 | AC | 147 ms
31,812 KB |
testcase_25 | AC | 72 ms
18,872 KB |
testcase_26 | AC | 78 ms
18,568 KB |
testcase_27 | AC | 159 ms
29,900 KB |
testcase_28 | AC | 51 ms
14,320 KB |
testcase_29 | AC | 128 ms
24,084 KB |
testcase_30 | AC | 133 ms
30,652 KB |
testcase_31 | AC | 130 ms
30,732 KB |
testcase_32 | AC | 59 ms
15,684 KB |
testcase_33 | AC | 128 ms
26,896 KB |
testcase_34 | AC | 153 ms
33,020 KB |
testcase_35 | AC | 90 ms
20,712 KB |
testcase_36 | AC | 131 ms
24,748 KB |
testcase_37 | AC | 101 ms
20,616 KB |
testcase_38 | AC | 116 ms
26,032 KB |
testcase_39 | AC | 111 ms
24,144 KB |
testcase_40 | AC | 140 ms
31,752 KB |
testcase_41 | AC | 157 ms
28,912 KB |
testcase_42 | AC | 90 ms
21,752 KB |
testcase_43 | AC | 114 ms
25,952 KB |
ソースコード
import sys input = sys.stdin.readline from math import gcd a,b=map(int,input().split()) T=list(map(int,input().split())) S=list(map(int,input().split())) GT=0 GS=0 for t in T: GT=gcd(GT,t) for s in S: GS=gcd(GS,s) if GS%GT==0: print("Yes") else: print("No")