結果

問題 No.91 赤、緑、青の石
ユーザー 👑 rin204rin204
提出日時 2022-01-20 10:21:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 354 ms / 5,000 ms
コード長 233 bytes
コンパイル時間 268 ms
コンパイル使用メモリ 87,176 KB
実行使用メモリ 76,468 KB
最終ジャッジ日時 2023-09-06 12:55:58
合計ジャッジ時間 6,491 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 267 ms
76,156 KB
testcase_01 AC 198 ms
76,468 KB
testcase_02 AC 141 ms
76,296 KB
testcase_03 AC 206 ms
76,380 KB
testcase_04 AC 131 ms
76,036 KB
testcase_05 AC 229 ms
76,372 KB
testcase_06 AC 113 ms
76,040 KB
testcase_07 AC 64 ms
71,472 KB
testcase_08 AC 66 ms
71,352 KB
testcase_09 AC 63 ms
71,524 KB
testcase_10 AC 64 ms
71,412 KB
testcase_11 AC 117 ms
76,428 KB
testcase_12 AC 226 ms
76,372 KB
testcase_13 AC 275 ms
76,176 KB
testcase_14 AC 194 ms
76,220 KB
testcase_15 AC 280 ms
76,320 KB
testcase_16 AC 73 ms
71,284 KB
testcase_17 AC 72 ms
71,148 KB
testcase_18 AC 72 ms
71,076 KB
testcase_19 AC 70 ms
71,308 KB
testcase_20 AC 70 ms
71,352 KB
testcase_21 AC 70 ms
71,308 KB
testcase_22 AC 70 ms
71,324 KB
testcase_23 AC 71 ms
71,420 KB
testcase_24 AC 71 ms
71,352 KB
testcase_25 AC 354 ms
76,304 KB
testcase_26 AC 326 ms
76,164 KB
testcase_27 AC 65 ms
71,356 KB
testcase_28 AC 89 ms
76,296 KB
testcase_29 AC 115 ms
76,244 KB
testcase_30 AC 237 ms
76,328 KB
testcase_31 AC 313 ms
76,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

rgb = list(map(int, input().split()))
rgb.sort()
ans = 0
while 1:
    x = rgb[0]
    ans += x
    rgb[0] -= x
    rgb[1] -= x
    rgb[2] -= x
    if rgb[2] <= 2:
        break
    rgb[0] += 1
    rgb[2] -= 2
    rgb.sort()
print(ans)
0