結果
問題 | No.91 赤、緑、青の石 |
ユーザー | yakeshiba |
提出日時 | 2021-04-08 23:55:35 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 368 bytes |
コンパイル時間 | 472 ms |
コンパイル使用メモリ | 87,140 KB |
実行使用メモリ | 71,528 KB |
最終ジャッジ日時 | 2023-09-06 07:48:34 |
合計ジャッジ時間 | 4,663 ms |
ジャッジサーバーID (参考情報) |
judge12 / 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 | 71 ms
71,436 KB |
testcase_08 | AC | 73 ms
71,096 KB |
testcase_09 | AC | 70 ms
71,384 KB |
testcase_10 | AC | 70 ms
71,224 KB |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | AC | 71 ms
71,248 KB |
testcase_17 | AC | 70 ms
71,480 KB |
testcase_18 | AC | 70 ms
71,036 KB |
testcase_19 | AC | 70 ms
71,428 KB |
testcase_20 | AC | 72 ms
71,352 KB |
testcase_21 | AC | 70 ms
71,460 KB |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | AC | 71 ms
71,320 KB |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
ソースコード
r, g, b = map(int,input().split()) ans = min(r,g,b) r,g,b = r-ans,g-ans,b-ans A = [r,g,b] A.sort() while True: maxim = A[2] minus = (maxim+1)//2 plus = minus//2 A[2] -= minus A[0] += plus tmp = min(A) if min(A) == 0: break ans += tmp for i in range(3): A[i] -= tmp A.sort() print(ans)