結果

問題 No.983 Convolution
ユーザー convexineq
提出日時 2021-05-06 09:44:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 130 bytes
コンパイル時間 290 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 106,880 KB
最終ジャッジ日時 2024-09-14 02:42:01
合計ジャッジ時間 4,052 ms
ジャッジサーバーID
(参考情報)
judge2 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

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