CodeMentor.
Ask AIProblemsLearnC++TCSCore CSHRProgress
0Lv 1
ProblemsHackerRank Warmup

Mini-Max Sum

Easy
HackerRank
7/12
EasyHackerRank Warmup

Mini-Max Sum

Five numbers. Minimum sum is total minus the maximum. Maximum sum is total minus the minimum.

Examples

Example 1

Input

1 2 3 4 5

Output

10 14

Stuck? Take a nudge

C++17Autosaves