結果
問題 |
No.2811 Calculation Within Sequence
|
ユーザー |
|
提出日時 | 2024-07-19 21:30:30 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 254 bytes |
コンパイル時間 | 203 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 142,360 KB |
最終ジャッジ日時 | 2024-07-19 21:30:42 |
合計ジャッジ時間 | 8,194 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 37 RE * 4 |
ソースコード
import math n,m=map(int,input().split()) T=list(map(int,input().split()))+[0]*max(0,m-m) S=list(map(int,input().split()))+[0]*max(0,n-m) x=math.gcd(*T) flag=1 for i in range(m): if (S[i]-T[i])%x!=0: flag=0 break print("Yes" if flag else "No")