結果

問題 No.91 赤、緑、青の石
ユーザー rpy3cpprpy3cpp
提出日時 2015-07-19 21:28:06
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 391 bytes
コンパイル時間 805 ms
コンパイル使用メモリ 10,624 KB
実行使用メモリ 7,972 KB
最終ジャッジ日時 2023-09-22 19:25:06
合計ジャッジ時間 2,607 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 15 ms
7,712 KB
testcase_07 AC 15 ms
7,736 KB
testcase_08 AC 14 ms
7,860 KB
testcase_09 AC 15 ms
7,812 KB
testcase_10 AC 15 ms
7,916 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 14 ms
7,812 KB
testcase_17 AC 15 ms
7,816 KB
testcase_18 AC 15 ms
7,784 KB
testcase_19 AC 15 ms
7,884 KB
testcase_20 AC 15 ms
7,764 KB
testcase_21 AC 15 ms
7,744 KB
testcase_22 AC 15 ms
7,792 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 15 ms
7,712 KB
testcase_28 AC 15 ms
7,784 KB
testcase_29 AC 15 ms
7,760 KB
testcase_30 AC 15 ms
7,816 KB
testcase_31 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

def solve(r, g, b):
    rgb = [r, g, b]
    rgb.sort()
    r, g, b = rgb
    s = r
    g -= r
    b -= r
    r2 = (b - g) // 2
    if r2 > g:
        s += g
        b -= g * 3
        s += b // 5
        return s
    s += r2
    g -= r2
    b -= r2 * 3
    n = g//4
    s += n
    g -= n
    if g == 3:
        s += 1
    return s
 
print(solve(R, G, B))
0