Submission #630846

# Submission time Handle Problem Language Result Execution time Memory
630846 2022-08-17T08:41:25 Z GudStonks Autići (COCI22_autici) C++17
0 / 50
0 ms 304 KB
#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll n, sum;
void fun()
{
	cin>>n;
	ll arr[n + 1];
	for(int i = 1; i <= n; i++)
		cin>>arr[i], sum += arr[i];
	sort(arr + 1, arr + 1 + n);
	cout<< arr[1] * (n - 1) + sum;
}

signed main(){
	ll ttt = 1;
	//cin>>ttt;
	while(ttt--)
		fun();
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 304 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -