結果

問題 No.91 赤、緑、青の石
ユーザー あかりきあかりき
提出日時 2021-02-09 10:46:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 119 ms / 5,000 ms
コード長 300 bytes
コンパイル時間 276 ms
コンパイル使用メモリ 87,296 KB
実行使用メモリ 76,248 KB
最終ジャッジ日時 2023-09-06 12:55:16
合計ジャッジ時間 4,386 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 92 ms
75,896 KB
testcase_01 AC 85 ms
76,248 KB
testcase_02 AC 81 ms
75,760 KB
testcase_03 AC 84 ms
75,904 KB
testcase_04 AC 79 ms
76,068 KB
testcase_05 AC 99 ms
75,908 KB
testcase_06 AC 79 ms
75,696 KB
testcase_07 AC 65 ms
71,324 KB
testcase_08 AC 66 ms
71,304 KB
testcase_09 AC 65 ms
71,292 KB
testcase_10 AC 69 ms
71,600 KB
testcase_11 AC 85 ms
76,088 KB
testcase_12 AC 93 ms
75,892 KB
testcase_13 AC 91 ms
75,956 KB
testcase_14 AC 86 ms
75,980 KB
testcase_15 AC 90 ms
75,896 KB
testcase_16 AC 65 ms
71,344 KB
testcase_17 AC 64 ms
71,496 KB
testcase_18 AC 70 ms
71,256 KB
testcase_19 AC 68 ms
71,468 KB
testcase_20 AC 73 ms
71,316 KB
testcase_21 AC 73 ms
71,432 KB
testcase_22 AC 72 ms
71,436 KB
testcase_23 AC 74 ms
71,256 KB
testcase_24 AC 73 ms
71,600 KB
testcase_25 AC 118 ms
76,020 KB
testcase_26 AC 111 ms
75,988 KB
testcase_27 AC 72 ms
71,284 KB
testcase_28 AC 81 ms
75,704 KB
testcase_29 AC 85 ms
75,812 KB
testcase_30 AC 116 ms
75,856 KB
testcase_31 AC 119 ms
76,144 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

r,g,b=map(int,input().split())
x=min(r,g,b)
r-=x;g-=x;b-=x
y=(r+g+b)//4
for i in range(max(r,g,b),-1,-1):
  ct=0
  if r>=i:
    ct+=(r-i)//2
  else:
    ct-=(i-r)
  if g>=i:
    ct+=(g-i)//2
  else:
    ct-=(i-g)
  if b>=i:
    ct+=(b-i)//2
  else:
    ct-=(i-b)
  if ct>=0:
    print(x+i)
    exit()
0