結果

問題 No.91 赤、緑、青の石
コンテスト
ユーザー nbisco
提出日時 2016-09-01 23:14:12
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 34 ms / 5,000 ms
コード長 332 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 104 ms
コンパイル使用メモリ 12,288 KB
実行使用メモリ 10,368 KB
最終ジャッジ日時 2025-12-07 12:26:39
合計ジャッジ時間 2,208 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

R,G,B = [int(i) for i in input().strip().split(" ")]

def check(n):
    left = 0
    shrt = 0
    for i in (R,G,B):
        if i >= n:
            left += (i-n)//2
        else:
            shrt += n-i
    return left >= shrt

total = 0
for i in range(24,-1,-1):
    if check(total+pow(2,i)):
        total += pow(2,i)
print(total)
0