結果

問題 No.91 赤、緑、青の石
ユーザー tonnnura172tonnnura172
提出日時 2020-05-08 17:06:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 209 ms / 5,000 ms
コード長 962 bytes
コンパイル時間 411 ms
コンパイル使用メモリ 87,164 KB
実行使用メモリ 81,020 KB
最終ジャッジ日時 2023-09-06 12:49:27
合計ジャッジ時間 7,310 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 195 ms
80,648 KB
testcase_01 AC 168 ms
80,724 KB
testcase_02 AC 188 ms
80,996 KB
testcase_03 AC 175 ms
80,716 KB
testcase_04 AC 180 ms
80,896 KB
testcase_05 AC 177 ms
80,932 KB
testcase_06 AC 172 ms
80,984 KB
testcase_07 AC 144 ms
79,928 KB
testcase_08 AC 144 ms
80,116 KB
testcase_09 AC 142 ms
80,232 KB
testcase_10 AC 155 ms
80,212 KB
testcase_11 AC 184 ms
81,020 KB
testcase_12 AC 192 ms
80,836 KB
testcase_13 AC 183 ms
80,720 KB
testcase_14 AC 197 ms
80,920 KB
testcase_15 AC 209 ms
80,640 KB
testcase_16 AC 161 ms
80,164 KB
testcase_17 AC 162 ms
80,140 KB
testcase_18 AC 160 ms
80,208 KB
testcase_19 AC 162 ms
80,204 KB
testcase_20 AC 158 ms
80,208 KB
testcase_21 AC 157 ms
80,232 KB
testcase_22 AC 152 ms
80,072 KB
testcase_23 AC 151 ms
80,204 KB
testcase_24 AC 147 ms
80,212 KB
testcase_25 AC 196 ms
80,720 KB
testcase_26 AC 196 ms
80,984 KB
testcase_27 AC 175 ms
80,800 KB
testcase_28 AC 180 ms
80,720 KB
testcase_29 AC 178 ms
80,856 KB
testcase_30 AC 191 ms
80,920 KB
testcase_31 AC 195 ms
80,800 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd, log
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul, add
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce, lru_cache
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

R, G, B = MAP()

R, G, B = sorted([R, G, B])

ans = 0
for i in range(B+1):
	if G > i:
		if R+(G-i)//2+(B-i)//2 >= i:
			ans = max(ans, i)
	else:
		if (i-R)+(i-G) <= (B-i)//2:
			ans = max(ans, i)

print(ans)
0