結果

問題 No.983 Convolution
ユーザー convexineqconvexineq
提出日時 2021-05-06 09:44:03
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 130 bytes
コンパイル時間 1,007 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 106,580 KB
最終ジャッジ日時 2023-10-12 02:58:20
合計ジャッジ時間 5,835 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,148 KB
testcase_01 AC 77 ms
71,128 KB
testcase_02 AC 77 ms
71,568 KB
testcase_03 AC 121 ms
97,556 KB
testcase_04 AC 109 ms
93,476 KB
testcase_05 AC 104 ms
90,700 KB
testcase_06 AC 121 ms
101,032 KB
testcase_07 AC 119 ms
100,356 KB
testcase_08 AC 88 ms
79,244 KB
testcase_09 AC 92 ms
83,480 KB
testcase_10 AC 86 ms
76,324 KB
testcase_11 AC 89 ms
79,316 KB
testcase_12 AC 125 ms
106,580 KB
testcase_13 AC 102 ms
82,532 KB
testcase_14 AC 102 ms
85,556 KB
testcase_15 AC 117 ms
97,332 KB
testcase_16 AC 101 ms
90,340 KB
testcase_17 AC 116 ms
103,056 KB
testcase_18 AC 81 ms
78,524 KB
testcase_19 AC 104 ms
90,604 KB
testcase_20 AC 126 ms
106,420 KB
testcase_21 AC 123 ms
98,532 KB
testcase_22 AC 82 ms
79,644 KB
testcase_23 AC 97 ms
96,024 KB
testcase_24 AC 80 ms
78,468 KB
testcase_25 AC 78 ms
77,376 KB
testcase_26 AC 88 ms
87,480 KB
testcase_27 AC 85 ms
84,720 KB
testcase_28 AC 95 ms
91,228 KB
testcase_29 AC 124 ms
101,328 KB
testcase_30 AC 93 ms
91,272 KB
testcase_31 AC 89 ms
83,428 KB
testcase_32 AC 108 ms
93,332 KB
testcase_33 AC 79 ms
71,180 KB
testcase_34 AC 78 ms
71,560 KB
testcase_35 AC 78 ms
71,440 KB
権限があれば一括ダウンロードができます

ソースコード

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