結果

問題 No.91 赤、緑、青の石
ユーザー c-yan
提出日時 2020-12-27 00:51:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 548 ms / 5,000 ms
コード長 310 bytes
コンパイル時間 262 ms
コンパイル使用メモリ 82,168 KB
実行使用メモリ 75,948 KB
最終ジャッジ日時 2024-06-24 07:30:36
合計ジャッジ時間 7,244 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

R, G, B = map(int, input().split())

a = [R, G, B]


def is_ok(n):
    m = 0
    p = 0
    for x in a:
        if x - n >= 0:
            p += (x - n) // 2
        else:
            m += n - x
    return p >= m


for i in range(min(a), max(a) + 2):
    if is_ok(i):
        continue
    print(i - 1)
    break
0