結果

問題 No.983 Convolution
ユーザー convexineq
提出日時 2021-05-06 09:41:36
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 152 bytes
コンパイル時間 335 ms
コンパイル使用メモリ 82,544 KB
実行使用メモリ 105,196 KB
最終ジャッジ日時 2024-09-14 02:41:50
合計ジャッジ時間 5,318 ms
ジャッジサーバーID
(参考情報)
judge6 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 17 WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import gcd
n = int(input())
*a, = map(lambda x:0 if x=="-1" else int(x),input().split())
g = 0
for i in a: g = gcd(g,i)
print(g if g else -1)
0