結果

問題 No.91 赤、緑、青の石
ユーザー roiti46roiti46
提出日時 2014-12-07 19:55:08
言語 Python2
(2.7.18)
結果
AC  
実行時間 1,215 ms / 5,000 ms
コード長 336 bytes
コンパイル時間 1,021 ms
コンパイル使用メモリ 6,712 KB
実行使用メモリ 6,116 KB
最終ジャッジ日時 2023-09-06 12:06:14
合計ジャッジ時間 13,675 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 798 ms
5,872 KB
testcase_01 AC 527 ms
5,860 KB
testcase_02 AC 311 ms
5,952 KB
testcase_03 AC 602 ms
5,852 KB
testcase_04 AC 292 ms
5,864 KB
testcase_05 AC 701 ms
5,952 KB
testcase_06 AC 134 ms
5,940 KB
testcase_07 AC 11 ms
5,940 KB
testcase_08 AC 11 ms
5,932 KB
testcase_09 AC 11 ms
5,880 KB
testcase_10 AC 11 ms
5,880 KB
testcase_11 AC 195 ms
6,016 KB
testcase_12 AC 637 ms
5,980 KB
testcase_13 AC 740 ms
5,856 KB
testcase_14 AC 460 ms
5,940 KB
testcase_15 AC 769 ms
6,040 KB
testcase_16 AC 11 ms
5,900 KB
testcase_17 AC 11 ms
6,040 KB
testcase_18 AC 11 ms
5,860 KB
testcase_19 AC 11 ms
5,936 KB
testcase_20 AC 11 ms
5,936 KB
testcase_21 AC 11 ms
5,856 KB
testcase_22 AC 11 ms
5,984 KB
testcase_23 AC 11 ms
6,104 KB
testcase_24 AC 11 ms
5,980 KB
testcase_25 AC 1,215 ms
5,852 KB
testcase_26 AC 1,123 ms
5,984 KB
testcase_27 AC 11 ms
5,872 KB
testcase_28 AC 56 ms
6,116 KB
testcase_29 AC 112 ms
6,064 KB
testcase_30 AC 727 ms
5,876 KB
testcase_31 AC 1,071 ms
5,936 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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