結果

問題 No.983 Convolution
ユーザー beet
提出日時 2020-02-09 15:39:51
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 117 ms / 2,000 ms
コード長 178 bytes
コンパイル時間 235 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 24,580 KB
最終ジャッジ日時 2024-10-01 05:59:44
合計ジャッジ時間 3,443 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

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