Official algorithmic problem description and constraints.
Athletes of Chefland have won G gold medals, S silver medals, and B bronze medals in the Paris Olympics.
Chef will be happy only if the Chefland team wins 5 medals of each type. Find the total number of additional medals the team needs to win to make Chef happy.
Detailed video explanations, mathematical intuition, and clean C++ implementation code.