結果

問題 No.91 赤、緑、青の石
ユーザー 👑 colognecologne
提出日時 2022-01-27 15:57:42
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 477 bytes
コンパイル時間 303 ms
コンパイル使用メモリ 86,960 KB
実行使用メモリ 71,648 KB
最終ジャッジ日時 2023-08-26 16:24:47
合計ジャッジ時間 4,542 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 69 ms
71,540 KB
testcase_08 AC 71 ms
71,184 KB
testcase_09 AC 71 ms
71,280 KB
testcase_10 AC 73 ms
71,540 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 70 ms
71,492 KB
testcase_17 AC 69 ms
71,556 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 67 ms
71,320 KB
testcase_21 AC 69 ms
71,436 KB
testcase_22 AC 69 ms
71,432 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 70 ms
71,388 KB
testcase_31 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys


def input(): return sys.stdin.readline().rstrip()


def main():
    r, g, b = sorted(map(int, input().split()))

    ans = r
    r = 0
    g -= r
    b -= r

    lim = min((b-g)//2, g)
    ans += lim
    g -= lim
    b -= 3*lim

    if g == 0:
        ans += b // 5
    else:
        lim = g // 4
        g -= lim * 4
        b -= lim * 4
        ans += lim
        if g >= 1 and b >= 3:
            ans += 1
    print(ans)


if __name__ == '__main__':
    main()
0