백준 14215 세 막대
https://www.acmicpc.net/problem/14215 14215번: 세 막대 첫째 줄에 a, b, c (1 ≤ a, b, c ≤ 100)가 주어진다. www.acmicpc.net 1 2 3 4 5 6 7 8 9 10 11 12 def sol(a, b, c): for x in range(a, 0, -1): for y in range(b, 0, -1): for z in range(c, 0, -1): if x + y + z - max(x, y, z) > max(x, y, z): return x + y + z if __name__ == '__main__': a, b, c = map(int, input().split()) print(sol(a, b, c)) Colored by Color Script..
2024. 2. 8.