結果

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

ソースコード

diff #
raw source code

#!/usr/bin/env python3
# -*- coding: utf-8-auto -*-

t = list(map(int, input().split()))

not_finish_flag = False
sum_ = 0
for i in range(len(t)):
    if t[i] == -1:
        print(-1)
        not_finish_flag = True
        continue

    if not_finish_flag:
        print(-1)
        continue

    temp = sum_ + t[i]

    if temp > 6000:
        print(-1)
        not_finish_flag = True
        continue

    sum_ = temp
    print(6000 - sum_)
0