結果

問題 No.970 数列変換マシン
ユーザー y61mpnly61mpnl
提出日時 2020-01-17 21:37:03
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 178 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 10,632 KB
実行使用メモリ 20,580 KB
最終ジャッジ日時 2023-09-08 01:52:36
合計ジャッジ時間 2,987 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
20,404 KB
testcase_01 AC 127 ms
20,516 KB
testcase_02 AC 133 ms
20,580 KB
testcase_03 AC 117 ms
19,556 KB
testcase_04 AC 119 ms
19,608 KB
testcase_05 AC 121 ms
19,616 KB
testcase_06 AC 103 ms
12,096 KB
testcase_07 AC 116 ms
19,556 KB
testcase_08 AC 116 ms
19,356 KB
testcase_09 AC 17 ms
8,296 KB
testcase_10 AC 16 ms
8,224 KB
testcase_11 AC 17 ms
8,380 KB
testcase_12 AC 17 ms
8,332 KB
testcase_13 AC 16 ms
8,232 KB
testcase_14 AC 19 ms
8,620 KB
testcase_15 AC 15 ms
7,832 KB
testcase_16 AC 16 ms
7,824 KB
testcase_17 AC 15 ms
7,836 KB
testcase_18 AC 15 ms
7,952 KB
testcase_19 AC 15 ms
7,824 KB
testcase_20 AC 15 ms
7,748 KB
testcase_21 AC 15 ms
7,828 KB
testcase_22 AC 16 ms
7,788 KB
testcase_23 AC 16 ms
7,832 KB
testcase_24 AC 16 ms
7,896 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
d = [a[0]-a[i] for i in range(1, n)]
ans = [a[0]-sum(d)] * n
for i in range(1, n): ans[i] = ans[0] + d[i-1]*(n-1)
print(*ans)
0