結果

問題 No.91 赤、緑、青の石
ユーザー c-yanc-yan
提出日時 2020-12-27 00:51:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 523 ms / 5,000 ms
コード長 310 bytes
コンパイル時間 313 ms
コンパイル使用メモリ 86,832 KB
実行使用メモリ 76,748 KB
最終ジャッジ日時 2023-09-06 12:53:53
合計ジャッジ時間 8,423 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 399 ms
76,484 KB
testcase_01 AC 277 ms
76,200 KB
testcase_02 AC 214 ms
76,476 KB
testcase_03 AC 295 ms
76,656 KB
testcase_04 AC 192 ms
76,448 KB
testcase_05 AC 348 ms
76,424 KB
testcase_06 AC 133 ms
76,664 KB
testcase_07 AC 75 ms
71,304 KB
testcase_08 AC 75 ms
71,476 KB
testcase_09 AC 76 ms
71,352 KB
testcase_10 AC 75 ms
71,332 KB
testcase_11 AC 172 ms
76,504 KB
testcase_12 AC 356 ms
76,548 KB
testcase_13 AC 370 ms
76,480 KB
testcase_14 AC 268 ms
76,748 KB
testcase_15 AC 360 ms
76,604 KB
testcase_16 AC 74 ms
71,308 KB
testcase_17 AC 77 ms
71,188 KB
testcase_18 AC 75 ms
71,528 KB
testcase_19 AC 74 ms
71,428 KB
testcase_20 AC 74 ms
71,424 KB
testcase_21 AC 74 ms
71,500 KB
testcase_22 AC 73 ms
71,260 KB
testcase_23 AC 78 ms
71,156 KB
testcase_24 AC 76 ms
71,216 KB
testcase_25 AC 523 ms
76,644 KB
testcase_26 AC 476 ms
76,500 KB
testcase_27 AC 78 ms
71,444 KB
testcase_28 AC 100 ms
76,428 KB
testcase_29 AC 129 ms
76,192 KB
testcase_30 AC 373 ms
76,708 KB
testcase_31 AC 474 ms
76,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

a = [R, G, B]


def is_ok(n):
    m = 0
    p = 0
    for x in a:
        if x - n >= 0:
            p += (x - n) // 2
        else:
            m += n - x
    return p >= m


for i in range(min(a), max(a) + 2):
    if is_ok(i):
        continue
    print(i - 1)
    break
0