Problem Description

Read n integers, output min, max, and (max-min). Use variables, one pass.

Input Format

Line1: n. Line2: n integers.

Output Format

One line: min max range.

Sample Test Case

Input:
5 2 7 -1 4 4
Output:
-1 7 8

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next