結果

問題 No.920 あかあお
ユーザー 141sksk
提出日時 2019-12-26 18:31:33
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 33 ms / 2,000 ms
コード長 338 bytes
コンパイル時間 385 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-10-04 16:37:38
合計ジャッジ時間 1,316 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():

    x, y, z = map(int, input().split())
    ans = 0

    while x > 0 and y > 0:
        x -= 1
        y -= 1
        ans += 1

    w = max(x, y)

    while w > 0 and z > 0:
        w -= 1
        z -= 1
        ans += 1

    while z > 1:
        z -= 2
        ans += 1

    print(ans)

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