結果

問題 No.3678 しゃべりすぎた男
コンテスト
ユーザー yas_yasyu
提出日時 2026-09-05 13:10:38
言語 PyPy3
(7.3.23)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 61 ms / 2,000 ms
+ 518µs
コード長 322 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 234 ms
コンパイル使用メモリ 96,340 KB
実行使用メモリ 79,104 KB
最終ジャッジ日時 2026-09-05 13:10:54
合計ジャッジ時間 4,308 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from itertools import accumulate

T = list(map(lambda x: int(x), input().split()))
acc = list(accumulate(T))
ALL = 6000
is_finish = False
for i in range(7):
    if T[i] == -1 or is_finish or ALL - acc[i] < 0:
        print(-1)
        is_finish = True
        continue

    print(ALL - acc[i] if ALL - acc[i] >= 0 else 0)
0