結果
問題 |
No.983 Convolution
|
ユーザー |
![]() |
提出日時 | 2020-02-11 14:25:34 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 401 bytes |
コンパイル時間 | 307 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 88,960 KB |
最終ジャッジ日時 | 2024-10-01 07:37:30 |
合計ジャッジ時間 | 6,223 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 33 |
ソースコード
def main(): import sys from fractions import gcd input = sys.stdin.readline N = int(input()) A = list(map(int, input().split())) if sum(A) == -N: print(-1) exit() B = [] for a in A: if a != -1: B.append(a) B.sort() g = B[0] for b in B[1:]: g = gcd(g, b) print(g**2) if __name__ == '__main__': main()