結果

問題 No.983 Convolution
ユーザー beetbeet
提出日時 2020-02-09 15:39:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 178 bytes
コンパイル時間 186 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 24,576 KB
最終ジャッジ日時 2024-04-08 12:19:33
合計ジャッジ時間 3,747 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
9,984 KB
testcase_01 AC 35 ms
9,984 KB
testcase_02 AC 38 ms
9,984 KB
testcase_03 AC 92 ms
20,332 KB
testcase_04 AC 87 ms
17,836 KB
testcase_05 AC 79 ms
16,668 KB
testcase_06 AC 102 ms
20,888 KB
testcase_07 AC 95 ms
21,424 KB
testcase_08 AC 43 ms
12,032 KB
testcase_09 AC 51 ms
14,132 KB
testcase_10 AC 41 ms
11,392 KB
testcase_11 AC 49 ms
12,268 KB
testcase_12 AC 98 ms
24,576 KB
testcase_13 AC 52 ms
13,636 KB
testcase_14 AC 57 ms
14,508 KB
testcase_15 AC 78 ms
20,384 KB
testcase_16 AC 66 ms
16,868 KB
testcase_17 AC 88 ms
22,120 KB
testcase_18 AC 41 ms
11,776 KB
testcase_19 AC 68 ms
16,608 KB
testcase_20 AC 100 ms
23,592 KB
testcase_21 AC 90 ms
19,696 KB
testcase_22 AC 45 ms
12,288 KB
testcase_23 AC 69 ms
19,328 KB
testcase_24 AC 39 ms
12,160 KB
testcase_25 AC 39 ms
11,776 KB
testcase_26 AC 55 ms
16,128 KB
testcase_27 AC 49 ms
14,516 KB
testcase_28 AC 80 ms
17,004 KB
testcase_29 AC 127 ms
23,724 KB
testcase_30 AC 80 ms
17,000 KB
testcase_31 AC 59 ms
13,808 KB
testcase_32 AC 86 ms
17,736 KB
testcase_33 AC 31 ms
9,984 KB
testcase_34 AC 31 ms
9,984 KB
testcase_35 AC 30 ms
9,984 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

n = int(input())
A = map(int, input().split())

g = -1
for a in A:
    if a < 0: continue;
    if g < 0: g = a;
    g = math.gcd(g, a)

print(g * g if g > 0 else g)
0