結果

問題 No.91 赤、緑、青の石
ユーザー roiti46roiti46
提出日時 2014-12-07 19:42:04
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 322 bytes
コンパイル時間 206 ms
コンパイル使用メモリ 6,696 KB
実行使用メモリ 6,152 KB
最終ジャッジ日時 2023-09-02 09:26:31
合計ジャッジ時間 13,036 ms
ジャッジサーバーID
(参考情報)
judge15 / judge16
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 786 ms
5,880 KB
testcase_01 AC 520 ms
5,996 KB
testcase_02 AC 309 ms
5,948 KB
testcase_03 AC 596 ms
6,048 KB
testcase_04 AC 289 ms
6,040 KB
testcase_05 AC 695 ms
5,952 KB
testcase_06 WA -
testcase_07 AC 11 ms
5,952 KB
testcase_08 AC 11 ms
5,952 KB
testcase_09 AC 11 ms
5,884 KB
testcase_10 AC 11 ms
5,996 KB
testcase_11 AC 194 ms
5,968 KB
testcase_12 AC 630 ms
5,884 KB
testcase_13 AC 729 ms
5,884 KB
testcase_14 AC 456 ms
5,952 KB
testcase_15 AC 756 ms
6,072 KB
testcase_16 AC 11 ms
5,880 KB
testcase_17 AC 11 ms
5,904 KB
testcase_18 AC 11 ms
5,956 KB
testcase_19 AC 11 ms
5,956 KB
testcase_20 AC 12 ms
6,072 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 12 ms
5,952 KB
testcase_24 AC 12 ms
5,964 KB
testcase_25 AC 1,191 ms
6,048 KB
testcase_26 AC 1,105 ms
5,900 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 725 ms
6,072 KB
testcase_31 AC 1,073 ms
5,956 KB
権限があれば一括ダウンロードができます

ソースコード

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