結果

問題 No.91 赤、緑、青の石
ユーザー gorugo30
提出日時 2021-02-26 18:03:00
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 375 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 81,696 KB
実行使用メモリ 52,352 KB
最終ジャッジ日時 2024-10-02 09:58:02
合計ジャッジ時間 2,495 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 6 WA * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

R, G, B = map(int, input().split())
ans = min(R, G, B)
R -= ans
G -= ans
B -= ans
stn = [R, G, B]
can = True
while can:
    stn.sort()
    stn[0] = (stn[2] - stn[1]) // 2
    stn[2] -= stn[0] * 2
    stn.sort()
    ans += stn[0]
    if stn[0] == 0:
        can = False
    stn = [stn[i] - stn[0] for i in range(3)]
stn.sort()
ans += 2 * (min(stn[1], stn[2]) // 3)
print(ans)
0