처음 든 생각 - 브루트 포스해도 시간 복잡도가 괜찮을까? -> 최대 50000이니깐 O(N)으로 한쪽으로만 탐색을 다 하면 충분하겠네 나의 답 import sys input = sys.stdin.readline N = int(input()) three = N // 3 five = 0 isPossible = False result = 10000000 while three >=0: if (N - (three * 3)) % 5 == 0: five = (N - (three * 3)) // 5 result = min(result, three + five) isPossible = True three -= 1 if isPossible: print(result) else: print(-1) 사용될 3의 개수의 최댓값..