結果

問題 No.983 Convolution
ユーザー convexineqconvexineq
提出日時 2020-02-11 14:05:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 104 ms / 2,000 ms
コード長 263 bytes
コンパイル時間 485 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 28,604 KB
最終ジャッジ日時 2024-04-08 14:52:10
合計ジャッジ時間 3,868 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
9,984 KB
testcase_01 AC 32 ms
9,984 KB
testcase_02 AC 30 ms
9,984 KB
testcase_03 AC 73 ms
21,672 KB
testcase_04 AC 70 ms
20,464 KB
testcase_05 AC 62 ms
18,400 KB
testcase_06 AC 83 ms
23,568 KB
testcase_07 AC 75 ms
22,564 KB
testcase_08 AC 39 ms
12,376 KB
testcase_09 AC 44 ms
14,572 KB
testcase_10 AC 36 ms
11,648 KB
testcase_11 AC 42 ms
13,016 KB
testcase_12 AC 78 ms
25,736 KB
testcase_13 AC 46 ms
14,640 KB
testcase_14 AC 49 ms
15,552 KB
testcase_15 AC 63 ms
21,736 KB
testcase_16 AC 54 ms
18,504 KB
testcase_17 AC 69 ms
23,672 KB
testcase_18 AC 37 ms
12,148 KB
testcase_19 AC 56 ms
18,136 KB
testcase_20 AC 77 ms
26,808 KB
testcase_21 AC 74 ms
22,848 KB
testcase_22 AC 38 ms
12,672 KB
testcase_23 AC 55 ms
19,816 KB
testcase_24 AC 36 ms
12,160 KB
testcase_25 AC 34 ms
11,776 KB
testcase_26 AC 47 ms
16,264 KB
testcase_27 AC 42 ms
14,800 KB
testcase_28 AC 68 ms
19,416 KB
testcase_29 AC 104 ms
28,604 KB
testcase_30 AC 68 ms
19,404 KB
testcase_31 AC 51 ms
15,088 KB
testcase_32 AC 72 ms
20,416 KB
testcase_33 AC 29 ms
9,984 KB
testcase_34 AC 30 ms
9,984 KB
testcase_35 AC 29 ms
9,984 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
# Your code here!

import sys
readline = sys.stdin.readline
read = sys.stdin.read

n,*a = [int(i) if i != "-1" else 0 for i in read().split()]

from math import gcd
from functools import reduce 

g = reduce(gcd,a)

if g: print(g*g)
else: print(-1)
0