結果

問題 No.983 Convolution
ユーザー chinchillachinchilla
提出日時 2020-02-16 15:00:29
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 174 ms / 2,000 ms
コード長 142 bytes
コンパイル時間 102 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 29,748 KB
最終ジャッジ日時 2024-04-16 03:35:36
合計ジャッジ時間 4,214 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
10,880 KB
testcase_01 AC 32 ms
10,624 KB
testcase_02 AC 32 ms
11,008 KB
testcase_03 AC 108 ms
21,552 KB
testcase_04 AC 110 ms
21,028 KB
testcase_05 AC 92 ms
18,656 KB
testcase_06 AC 125 ms
23,376 KB
testcase_07 AC 110 ms
22,696 KB
testcase_08 AC 47 ms
12,928 KB
testcase_09 AC 51 ms
14,048 KB
testcase_10 AC 43 ms
12,416 KB
testcase_11 AC 53 ms
13,720 KB
testcase_12 AC 108 ms
22,784 KB
testcase_13 AC 64 ms
15,532 KB
testcase_14 AC 67 ms
15,872 KB
testcase_15 AC 92 ms
20,108 KB
testcase_16 AC 75 ms
17,304 KB
testcase_17 AC 102 ms
21,952 KB
testcase_18 AC 45 ms
12,800 KB
testcase_19 AC 82 ms
18,316 KB
testcase_20 AC 118 ms
23,648 KB
testcase_21 AC 120 ms
23,608 KB
testcase_22 AC 47 ms
12,928 KB
testcase_23 AC 73 ms
18,116 KB
testcase_24 AC 40 ms
12,544 KB
testcase_25 AC 39 ms
12,160 KB
testcase_26 AC 57 ms
15,548 KB
testcase_27 AC 54 ms
14,672 KB
testcase_28 AC 105 ms
20,360 KB
testcase_29 AC 174 ms
29,748 KB
testcase_30 AC 109 ms
20,352 KB
testcase_31 AC 72 ms
16,052 KB
testcase_32 AC 112 ms
21,512 KB
testcase_33 AC 32 ms
10,624 KB
testcase_34 AC 32 ms
10,752 KB
testcase_35 AC 32 ms
11,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math, functools
n = int(input())
a = [int(w) for w in input().split() if int(w)>0]
print(functools.reduce(math.gcd, a)**2 if a else -1)
0