結果

問題 No.2811 Calculation Within Sequence
ユーザー vwxyz
提出日時 2024-07-19 22:20:38
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 276 ms / 2,000 ms
コード長 201 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 29,156 KB
最終ジャッジ日時 2024-07-19 22:20:49
合計ジャッジ時間 9,993 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 41
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
a,b=map(int,input().split())
T=0
for t in map(int,input().split()):
	T=math.gcd(T,t)
S=0
for s in map(int,input().split()):
	S=math.gcd(S,s)
if S%T==0:
	ans="Yes"
else:
	ans="No"
print(ans)
0