Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- using ll = long long;
- using ld = long double;
- int main()
- {
- ll c = 1;
- while (true)
- {
- ll n;
- cin >> n;
- ll min = 1e9;
- ll max = -1e9;
- while (n-- > 0)
- {
- ll a;
- cin >> a;
- if (a > max)
- {
- max = a;
- }
- if (a < min)
- {
- min = a;
- }
- }
- cout << "Case " << c << ": " << min << " " << max << " " << max - min << endl;
- c++;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment