結果

問題 No.91 赤、緑、青の石
ユーザー あかりきあかりき
提出日時 2021-02-09 10:39:23
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 334 bytes
コンパイル時間 268 ms
コンパイル使用メモリ 86,852 KB
実行使用メモリ 71,556 KB
最終ジャッジ日時 2023-09-20 21:01:27
合計ジャッジ時間 4,268 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,180 KB
testcase_01 WA -
testcase_02 AC 71 ms
71,292 KB
testcase_03 AC 72 ms
71,284 KB
testcase_04 AC 74 ms
71,196 KB
testcase_05 AC 71 ms
71,192 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 79 ms
71,404 KB
testcase_10 AC 79 ms
71,340 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 79 ms
71,292 KB
testcase_16 AC 77 ms
71,300 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 77 ms
71,368 KB
testcase_23 AC 78 ms
71,288 KB
testcase_24 AC 78 ms
71,064 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 71 ms
71,408 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

r,g,b=map(int,input().split())
x=min(r,g,b)
r-=x;g-=x;b-=x
y=(r+g+b)//4
f=0
if (r==0 and max((g-y)//2,0)+max((b-y)//2,0)<y) or (g==0 and max((r-y)//2,0)+max((b-y)//2,0)<y) or (b==0 and max((r-y)//2,0)+max((g-y)//2,0)<y):
  f=1
if (r==0 and g==0) or (g==0 or b==0) or (r==0 and b==0):
  print((r+g+b)//5)
  exit()
print(x+(r+g+b)//4-f)
0