結果

問題 No.970 数列変換マシン
ユーザー hedwig100hedwig100
提出日時 2020-04-08 18:17:14
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 107 ms / 2,000 ms
コード長 410 bytes
コンパイル時間 141 ms
コンパイル使用メモリ 10,928 KB
実行使用メモリ 20,160 KB
最終ジャッジ日時 2023-09-26 06:16:34
合計ジャッジ時間 3,215 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 104 ms
19,340 KB
testcase_01 AC 103 ms
19,448 KB
testcase_02 AC 107 ms
19,296 KB
testcase_03 AC 98 ms
20,160 KB
testcase_04 AC 99 ms
20,000 KB
testcase_05 AC 100 ms
20,048 KB
testcase_06 AC 81 ms
11,740 KB
testcase_07 AC 99 ms
20,040 KB
testcase_08 AC 98 ms
19,828 KB
testcase_09 AC 20 ms
8,744 KB
testcase_10 AC 19 ms
8,616 KB
testcase_11 AC 20 ms
8,724 KB
testcase_12 AC 19 ms
8,624 KB
testcase_13 AC 19 ms
8,760 KB
testcase_14 AC 21 ms
8,892 KB
testcase_15 AC 18 ms
8,540 KB
testcase_16 AC 18 ms
8,556 KB
testcase_17 AC 19 ms
8,584 KB
testcase_18 AC 18 ms
8,460 KB
testcase_19 AC 18 ms
8,508 KB
testcase_20 AC 18 ms
8,576 KB
testcase_21 AC 18 ms
8,592 KB
testcase_22 AC 18 ms
8,456 KB
testcase_23 AC 19 ms
8,496 KB
testcase_24 AC 20 ms
8,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 10 ** 9 + 7
INF = 10 ** 10
import sys
sys.setrecursionlimit(100000000)
dy = (-1,0,1,0)
dx = (0,1,0,-1)
from collections import deque

def main():
    n = int(input())
    Y = list(map(int,input().split()))
    if n == 2:
        print(Y[1],Y[0])
        return
    x = sum(Y)
    X = [x] * n
    for i in range(n):
        X[i] -= (n - 1) * Y[i]
    
    print(*X)

if __name__ =='__main__':
    main()  
0