結果

問題 No.2821 A[i] ← 2A[j] - A[i]
ユーザー tassei903tassei903
提出日時 2024-07-26 22:07:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 210 ms / 1,500 ms
コード長 457 bytes
コンパイル時間 362 ms
コンパイル使用メモリ 82,180 KB
実行使用メモリ 134,880 KB
最終ジャッジ日時 2024-07-26 22:07:41
合計ジャッジ時間 5,529 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,384 KB
testcase_01 AC 167 ms
110,700 KB
testcase_02 AC 210 ms
134,880 KB
testcase_03 AC 189 ms
133,164 KB
testcase_04 AC 136 ms
99,452 KB
testcase_05 AC 140 ms
101,048 KB
testcase_06 AC 101 ms
95,404 KB
testcase_07 AC 105 ms
92,980 KB
testcase_08 AC 139 ms
98,756 KB
testcase_09 AC 73 ms
82,856 KB
testcase_10 AC 92 ms
83,928 KB
testcase_11 AC 83 ms
83,284 KB
testcase_12 AC 82 ms
83,072 KB
testcase_13 AC 86 ms
83,608 KB
testcase_14 AC 87 ms
87,648 KB
testcase_15 AC 94 ms
88,000 KB
testcase_16 AC 79 ms
81,516 KB
testcase_17 AC 89 ms
86,432 KB
testcase_18 AC 101 ms
87,700 KB
testcase_19 AC 64 ms
70,444 KB
testcase_20 AC 64 ms
70,876 KB
testcase_21 AC 54 ms
64,528 KB
testcase_22 AC 53 ms
65,624 KB
testcase_23 AC 56 ms
65,820 KB
testcase_24 AC 41 ms
54,284 KB
testcase_25 AC 41 ms
54,060 KB
testcase_26 AC 47 ms
60,308 KB
testcase_27 AC 46 ms
59,824 KB
testcase_28 AC 45 ms
59,088 KB
testcase_29 AC 46 ms
59,404 KB
testcase_30 AC 40 ms
52,876 KB
testcase_31 AC 39 ms
52,940 KB
testcase_32 AC 42 ms
54,608 KB
testcase_33 AC 47 ms
60,668 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
#######################################################################
from math import gcd
n = ni()
a = na()
g = 0
for i in range(n):
    g = gcd(g, a[i] - a[0])
    print(g)
0