結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー tanon710tanon710
提出日時 2020-07-08 00:03:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 282 bytes
コンパイル時間 151 ms
コンパイル使用メモリ 82,312 KB
実行使用メモリ 99,056 KB
最終ジャッジ日時 2024-04-09 21:29:46
合計ジャッジ時間 3,472 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
52,376 KB
testcase_01 AC 34 ms
52,240 KB
testcase_02 AC 71 ms
90,388 KB
testcase_03 AC 45 ms
67,980 KB
testcase_04 AC 71 ms
93,200 KB
testcase_05 AC 44 ms
65,776 KB
testcase_06 AC 75 ms
96,136 KB
testcase_07 AC 62 ms
85,200 KB
testcase_08 AC 77 ms
98,820 KB
testcase_09 AC 61 ms
85,672 KB
testcase_10 AC 65 ms
89,036 KB
testcase_11 AC 81 ms
99,056 KB
testcase_12 AC 62 ms
86,768 KB
testcase_13 AC 64 ms
86,520 KB
testcase_14 AC 76 ms
96,080 KB
testcase_15 AC 68 ms
91,060 KB
testcase_16 AC 55 ms
78,252 KB
testcase_17 AC 44 ms
63,800 KB
testcase_18 AC 53 ms
79,612 KB
testcase_19 AC 59 ms
84,296 KB
testcase_20 AC 57 ms
83,064 KB
testcase_21 AC 62 ms
86,920 KB
testcase_22 AC 32 ms
53,136 KB
testcase_23 AC 32 ms
52,948 KB
testcase_24 AC 78 ms
99,044 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3

import sys
input=sys.stdin.readline

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