結果

問題 No.91 赤、緑、青の石
ユーザー yuushi narazaki
提出日時 2025-03-07 15:29:29
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 496 bytes
コンパイル時間 582 ms
コンパイル使用メモリ 82,412 KB
実行使用メモリ 53,836 KB
最終ジャッジ日時 2025-03-07 15:29:33
合計ジャッジ時間 3,209 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

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

left = 0
right = 10**7 

ans = 0

def search(mid,R,G,B):

     count = 0
     s = min(R,G,B)
     R -= mid
     G -= mid
     B -= mid
     count += max(R//2,0) + max(G//2,0) + max(B//2,0)
     if((s + count) >= mid):
        return True
     else:
        return False   




while abs(left - right) > 1:
    mid = (left + right) // 2
    if(search(mid,R,G,B)):
        left = mid
        ans = max(ans,mid)
    else:
        right = mid   
print(ans)         
0