結果

問題 No.91 赤、緑、青の石
ユーザー rlangevinrlangevin
提出日時 2023-01-22 02:15:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,232 ms / 5,000 ms
コード長 329 bytes
コンパイル時間 533 ms
コンパイル使用メモリ 87,360 KB
実行使用メモリ 77,040 KB
最終ジャッジ日時 2023-09-06 12:52:07
合計ジャッジ時間 21,371 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,093 ms
77,040 KB
testcase_01 AC 661 ms
76,800 KB
testcase_02 AC 934 ms
76,936 KB
testcase_03 AC 742 ms
76,792 KB
testcase_04 AC 868 ms
76,712 KB
testcase_05 AC 829 ms
76,904 KB
testcase_06 AC 563 ms
76,908 KB
testcase_07 AC 72 ms
71,248 KB
testcase_08 AC 71 ms
71,524 KB
testcase_09 AC 73 ms
71,296 KB
testcase_10 AC 72 ms
71,308 KB
testcase_11 AC 898 ms
76,796 KB
testcase_12 AC 1,024 ms
76,840 KB
testcase_13 AC 741 ms
76,780 KB
testcase_14 AC 838 ms
76,848 KB
testcase_15 AC 1,232 ms
76,808 KB
testcase_16 AC 72 ms
71,144 KB
testcase_17 AC 71 ms
71,264 KB
testcase_18 AC 72 ms
71,248 KB
testcase_19 AC 72 ms
71,496 KB
testcase_20 AC 71 ms
71,304 KB
testcase_21 AC 71 ms
71,324 KB
testcase_22 AC 73 ms
71,344 KB
testcase_23 AC 73 ms
71,224 KB
testcase_24 AC 72 ms
71,164 KB
testcase_25 AC 1,080 ms
76,812 KB
testcase_26 AC 1,037 ms
76,892 KB
testcase_27 AC 1,001 ms
76,868 KB
testcase_28 AC 974 ms
76,780 KB
testcase_29 AC 663 ms
76,760 KB
testcase_30 AC 1,079 ms
76,872 KB
testcase_31 AC 1,082 ms
76,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def f(a, b, c):
    L = [a, b, c]
    if min(L) < 0:
        return 0
    L.sort()
    v = (L[-1] - L[0])//3
    L[-1] -= 2 * v
    L[0] += v
    return L

R, G, B = map(int, input().split())
L = [R, G, B]
L.sort()
R, G, B = L
ans = 0
for i in range(B//2 + 1):
    X = f(R + i, G, B - 2 * i)
    ans = max(ans, min(X))
print(ans)
0