結果

問題 No.983 Convolution
ユーザー convexineqconvexineq
提出日時 2020-02-11 14:05:16
言語 Python3
(3.10.1 + numpy 1.22.3 + scipy 1.8.0)
結果
AC  
実行時間 92 ms / 2,000 ms
コード長 263 bytes
コンパイル時間 58 ms
使用メモリ 26,284 KB
最終ジャッジ日時 2022-11-24 17:32:36
合計ジャッジ時間 3,259 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 19 ms
8,144 KB
testcase_01 AC 19 ms
8,204 KB
testcase_02 AC 19 ms
8,128 KB
testcase_03 AC 61 ms
19,472 KB
testcase_04 AC 59 ms
18,032 KB
testcase_05 AC 54 ms
16,780 KB
testcase_06 AC 70 ms
21,168 KB
testcase_07 AC 64 ms
20,092 KB
testcase_08 AC 29 ms
10,076 KB
testcase_09 AC 31 ms
12,052 KB
testcase_10 AC 25 ms
9,520 KB
testcase_11 AC 29 ms
10,552 KB
testcase_12 AC 68 ms
24,060 KB
testcase_13 AC 35 ms
12,400 KB
testcase_14 AC 37 ms
13,572 KB
testcase_15 AC 52 ms
19,320 KB
testcase_16 AC 43 ms
16,272 KB
testcase_17 AC 59 ms
21,888 KB
testcase_18 AC 26 ms
9,884 KB
testcase_19 AC 46 ms
16,516 KB
testcase_20 AC 70 ms
24,720 KB
testcase_21 AC 66 ms
20,504 KB
testcase_22 AC 28 ms
10,488 KB
testcase_23 AC 46 ms
17,792 KB
testcase_24 AC 25 ms
9,976 KB
testcase_25 AC 22 ms
9,524 KB
testcase_26 AC 35 ms
13,916 KB
testcase_27 AC 30 ms
12,488 KB
testcase_28 AC 56 ms
17,136 KB
testcase_29 AC 92 ms
26,284 KB
testcase_30 AC 53 ms
16,956 KB
testcase_31 AC 36 ms
12,988 KB
testcase_32 AC 59 ms
18,100 KB
testcase_33 AC 19 ms
8,204 KB
testcase_34 AC 18 ms
8,252 KB
testcase_35 AC 20 ms
8,144 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