AtCoder Beginner Contest 185
翻译中…
Problem Statement
翻译中…
Takahashi has decided to hold some number of programming contests.
Holding one contest requires one $100$-point problem, one $200$-point problem, one $300$-point problem, and one $400$-point problem.
When he has $A_1$, $A_2$, $A_3$, and $A_4$ drafts of $100$-, $200$-, $300$-, and $400$-point problems, respectively, at most how many contests can he hold?
The same draft can be used only once.
翻译中…
Constraints
翻译中…
$1 \le A_i \le 100$$(1 \le i \le 4)$- All values in input are integers.
翻译中…
Input
翻译中…
Input is given from Standard Input in the following format:
翻译中…
A_1 \hspace{7pt} A_2 \hspace{7pt} A_3 \hspace{7pt} A_4
翻译中…
Output
翻译中…
Print an integer representing the maximum number of contests that can be held.
翻译中…
样例
Input #1
5 3 7 11
Output #1
3
By using three drafts for each slot, he can hold three contests. He has just three drafts for $200$-point problems, so he cannot hold four.
Input #2
100 100 1 100
Output #2
1
A contest cannot be held even if there is just one missing slot.
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。