Mini-Max Sum

Read the lesson → understand the pattern → then code. Tutor works offline (built-in teacher); optional Cursor/Gemini keys upgrade chat quality.

Topic refresher: HackerRank Warmup

Classic warmup problems, taught slowly in Hindi, English, or Hinglish, then typed by you.

long long sum = 0;
for (int x : a) sum += x;
return sum;
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++17