No.1122 Plane Tickets
レベル :
/ AI推定難易度 : 1750
/ 実行時間制限 : 1ケース 1.000秒 / メモリ制限
: 512 MB / 標準ジャッジ問題
タグ : / 解いたユーザー数 36
作問者 :
e869120
/ テスター :
square1001
タグ : / 解いたユーザー数 36
作問者 :
e869120
/ テスター :
問題文最終更新日: 2020-07-17 23:24:52
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest 258
(順位表)
の他の問題:
Problem Statement
E869120 has the following 5 types of vouchers, which can be used only with Yuki Airlines.
- $a$ vouchers of type A.
- $b$ vouchers of type B.
- $c$ vouchers of type C.
- $d$ vouchers of type D.
- $e$ vouchers of type E.
- Use $1$ voucher each of types A, B, C.
- Use $1$ voucher each of types B, C, D.
- Use $1$ voucher each of types C, D, E.
- Use $1$ voucher each of types D, E, A.
- Use $1$ voucher each of types E, A, B.
Input
$a$ $b$ $c$ $d$ $e$
The integers $a$, $b$, $c$, $d$, $e$ are given on line $1$, separated by spaces.
Output
Print, on 1 line, the maximum number of times he can ride a plane for free.
Constraints
- $0 \leq a, b, c, d, e \leq 10^{15}$
- All inputs are integers.
Sample
Sample 1
Input
1 1 2 1 1
Output
2
For example, the following operations allow him to ride a plane for free 2 times.
- Use 1 voucher each of A, B, C.
- Use 1 voucher each of C, D, E.
Sample 2
Input
4208 0 0 3076 2935
Output
2935
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。