結果

問題 No.970 数列変換マシン
ユーザー もりをもりを
提出日時 2020-01-17 21:33:21
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 259 bytes
コンパイル時間 648 ms
コンパイル使用メモリ 86,964 KB
実行使用メモリ 108,976 KB
最終ジャッジ日時 2023-09-08 01:45:31
合計ジャッジ時間 4,636 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
107,524 KB
testcase_01 AC 129 ms
107,528 KB
testcase_02 AC 130 ms
107,580 KB
testcase_03 AC 125 ms
107,136 KB
testcase_04 AC 125 ms
107,184 KB
testcase_05 AC 129 ms
106,780 KB
testcase_06 AC 124 ms
108,976 KB
testcase_07 AC 126 ms
105,052 KB
testcase_08 AC 125 ms
105,004 KB
testcase_09 AC 73 ms
75,152 KB
testcase_10 AC 72 ms
75,144 KB
testcase_11 AC 81 ms
77,020 KB
testcase_12 AC 79 ms
76,928 KB
testcase_13 AC 74 ms
75,400 KB
testcase_14 AC 80 ms
76,928 KB
testcase_15 AC 67 ms
71,420 KB
testcase_16 AC 68 ms
71,380 KB
testcase_17 AC 69 ms
71,604 KB
testcase_18 AC 69 ms
71,308 KB
testcase_19 AC 69 ms
71,348 KB
testcase_20 AC 67 ms
71,660 KB
testcase_21 AC 68 ms
71,404 KB
testcase_22 AC 67 ms
71,216 KB
testcase_23 AC 67 ms
71,384 KB
testcase_24 AC 67 ms
71,276 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int,input().split()))

l = []
for i, j in zip(a, a[1:]):
    l.append((i - j) * (n - 1))

b = [0]
for i in l:
    b.append(b[-1] + i)
sm = sum(b)
offset = (a[0] * (n - 1) - (sm - b[0])) // (n - 1)
print(*(i + offset for i in b))
0