結果

問題 No.91 赤、緑、青の石
ユーザー roiti46
提出日時 2014-12-07 19:42:04
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 322 bytes
コンパイル時間 41 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-11 16:13:15
合計ジャッジ時間 12,190 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 22 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

R,G,B = map(int,raw_input().split())
M = min(R,G,B)
R,B = sorted([R-M,G-M,B-M],reverse = True)[:2]
ans = M
while 1:
    if R >= B > 0 and R >= 3:
        R -= 3
        B -= 1
        ans += 1
    elif B >= R > 0 and B >= 3:
        R -= 1
        B -= 3
        ans += 1
    else:
        break
print ans
0