結果
| 問題 |
No.2811 Calculation Within Sequence
|
| コンテスト | |
| ユーザー |
とりゐ
|
| 提出日時 | 2024-07-19 21:21:47 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 184 ms / 2,000 ms |
| コード長 | 231 bytes |
| コンパイル時間 | 455 ms |
| コンパイル使用メモリ | 82,208 KB |
| 実行使用メモリ | 132,184 KB |
| 最終ジャッジ日時 | 2024-07-19 21:21:59 |
| 合計ジャッジ時間 | 7,983 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 41 |
ソースコード
n,m=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
import math
def calc(c):
g=0
for i in c:
g=math.gcd(i,g)
return g
if calc(b)%calc(a)==0:
print("Yes")
else:
print("No")
とりゐ