結果

問題 No.983 Convolution
ユーザー beetbeet
提出日時 2020-02-09 15:39:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 83 ms / 2,000 ms
コード長 178 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 89,116 KB
最終ジャッジ日時 2024-04-08 12:19:37
合計ジャッジ時間 3,638 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,588 KB
testcase_01 AC 38 ms
53,588 KB
testcase_02 AC 40 ms
53,588 KB
testcase_03 AC 66 ms
78,664 KB
testcase_04 AC 64 ms
76,960 KB
testcase_05 AC 62 ms
73,280 KB
testcase_06 AC 72 ms
82,472 KB
testcase_07 AC 69 ms
79,632 KB
testcase_08 AC 48 ms
63,340 KB
testcase_09 AC 51 ms
67,568 KB
testcase_10 AC 47 ms
62,164 KB
testcase_11 AC 49 ms
63,556 KB
testcase_12 AC 71 ms
84,348 KB
testcase_13 AC 59 ms
67,228 KB
testcase_14 AC 59 ms
68,588 KB
testcase_15 AC 70 ms
78,136 KB
testcase_16 AC 62 ms
72,836 KB
testcase_17 AC 76 ms
80,780 KB
testcase_18 AC 51 ms
63,128 KB
testcase_19 AC 67 ms
73,112 KB
testcase_20 AC 81 ms
84,828 KB
testcase_21 AC 83 ms
81,556 KB
testcase_22 AC 51 ms
63,612 KB
testcase_23 AC 57 ms
74,964 KB
testcase_24 AC 46 ms
62,780 KB
testcase_25 AC 44 ms
62,396 KB
testcase_26 AC 51 ms
69,036 KB
testcase_27 AC 49 ms
65,640 KB
testcase_28 AC 59 ms
73,876 KB
testcase_29 AC 75 ms
89,116 KB
testcase_30 AC 61 ms
73,876 KB
testcase_31 AC 54 ms
67,816 KB
testcase_32 AC 67 ms
77,020 KB
testcase_33 AC 41 ms
53,588 KB
testcase_34 AC 41 ms
53,588 KB
testcase_35 AC 41 ms
53,588 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