답안 #799373

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
799373 2023-07-31T13:28:51 Z Tunglam07 Autići (COCI22_autici) C++17
50 / 50
12 ms 2096 KB
#include <bits/stdc++.h>
using namespace std;

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	long long n,minn=INT_MAX,sum=0,a[100001];
	cin >> n;
	for(int i=1;i<=n;i++)
	{
		cin >> a[i];
		minn=min(minn,a[i]);
	}
	for(int i=1;i<=n;i++)
	{
		
		sum=sum+a[i] + minn;
	}	
	sum-=minn*2;
	cout << sum;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 980 KB Output is correct
2 Correct 5 ms 980 KB Output is correct
3 Correct 12 ms 1100 KB Output is correct
4 Correct 8 ms 1876 KB Output is correct
5 Correct 9 ms 2076 KB Output is correct
6 Correct 8 ms 1872 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 980 KB Output is correct
2 Correct 1 ms 980 KB Output is correct
3 Correct 1 ms 980 KB Output is correct
4 Correct 1 ms 980 KB Output is correct
5 Correct 1 ms 1104 KB Output is correct
6 Correct 1 ms 1108 KB Output is correct
7 Correct 1 ms 1108 KB Output is correct
8 Correct 1 ms 1108 KB Output is correct
9 Correct 1 ms 1108 KB Output is correct
10 Correct 1 ms 1104 KB Output is correct
11 Correct 1 ms 1104 KB Output is correct
12 Correct 1 ms 1108 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 980 KB Output is correct
2 Correct 5 ms 980 KB Output is correct
3 Correct 12 ms 1100 KB Output is correct
4 Correct 8 ms 1876 KB Output is correct
5 Correct 9 ms 2076 KB Output is correct
6 Correct 8 ms 1872 KB Output is correct
7 Correct 1 ms 980 KB Output is correct
8 Correct 1 ms 980 KB Output is correct
9 Correct 1 ms 980 KB Output is correct
10 Correct 1 ms 980 KB Output is correct
11 Correct 1 ms 1104 KB Output is correct
12 Correct 1 ms 1108 KB Output is correct
13 Correct 1 ms 1108 KB Output is correct
14 Correct 1 ms 1108 KB Output is correct
15 Correct 1 ms 1108 KB Output is correct
16 Correct 1 ms 1104 KB Output is correct
17 Correct 1 ms 1104 KB Output is correct
18 Correct 1 ms 1108 KB Output is correct
19 Correct 1 ms 980 KB Output is correct
20 Correct 1 ms 980 KB Output is correct
21 Correct 5 ms 1240 KB Output is correct
22 Correct 11 ms 2096 KB Output is correct
23 Correct 9 ms 2004 KB Output is correct
24 Correct 11 ms 1992 KB Output is correct
25 Correct 8 ms 1980 KB Output is correct
26 Correct 8 ms 1876 KB Output is correct
27 Correct 8 ms 2004 KB Output is correct
28 Correct 10 ms 1848 KB Output is correct
29 Correct 8 ms 2004 KB Output is correct
30 Correct 8 ms 1980 KB Output is correct