結果

問題 No.3654 Cup Ramen
コンテスト
ユーザー RYOKO NANAO
提出日時 2026-08-30 15:41:21
言語 Python3
(3.14.7 + numpy 2.5.2 + scipy 1.18.0)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
RE  
実行時間 -
コード長 490 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 633 ms
コンパイル使用メモリ 21,416 KB
実行使用メモリ 21,376 KB
最終ジャッジ日時 2026-08-30 15:41:29
合計ジャッジ時間 7,351 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from pathlib import Path

def my_mma022A_function():
    current_dir = Path(__file__).parent
    file_path = current_dir / "01_sample_03.txt"

    with open(file_path, "r", encoding="utf-8-sig") as f:
        items = f.read().split()

    N = int(items[0])
    X = int(items[1])
    sum = 0
    for i in range(2, len(items)):
        sum += int(items[i])

    answer = sum - X

    if answer < 0 :
        answer = 0

    print(answer)

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