https://www.acmicpc.net/problem/15059
-- The flight attendant in this flight decided to change the procedure. First she will ask all passengers what choice of meal they would prefer, and then she will check if the number of meals available in this flight for each choice are enough.
-- Given the quantity of meals available for each choice and the number of meals requested for each choice, could you please help the flight attendant to determine how many passengers will surely not receive their selection for a meal?
-- 대충 항공기에서 기내식을 나눠 줄 때 치킨, 비프, 파스타 중 선택해야함, 이 때 승객들이 얼마나 어느 메뉴를 원하는지 모르는 이슈 발생, 따라서 승객들 중 원하는 메뉴를 배식 받지 못한 수를 구하는 문제
입력
-- 첫째줄에는 배식 가능한 치킨, 비프, 파스타의 수량이 제공
-- 둘째줄에는 승객들이 원하는 치킨, 비프, 파스타의 수량이 제공
a, b, c = map(int, input().split())
r_a, r_b, r_c = map(int, input().split())
n_a = 0
n_b = 0
n_c = 0
if a < r_a:
n_a = r_a - a
if b < r_b:
n_b = r_b - b
if c < r_c:
n_c = r_c - c
print(n_a+n_b+n_c)
다시 알고리즘 공부를 열심히 하자!!