190902025-11-22 10:34:08algoproA szomjas pincércpp17Accepted 100/10027ms596 KiB
// UUID: 043146e0-759f-447f-99a1-7162f4dee200
#include <bits/stdc++.h>
using namespace std;

int main() {
	int N;
	cin >> N;
	vector<int> jegkocka(N);
	for (int i = 0; i < N; i++){
		cin >> jegkocka[i];
	}
		
	

	for (int i = 0; i <= N - 1; i++){
	 	if (jegkocka[i] > 0) {
		jegkocka[i] = jegkocka[i] - 1;
		}
	}

	/*for (int x : jegkocka)
	cout << x << " ";*/
	int osszeg = 0;
	for  (int i = 0; i <  N; i++){
		osszeg += jegkocka[i];
	}
	cout << osszeg;

	
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted1ms316 KiB
2Accepted1ms316 KiB
subtask220/20
3Accepted1ms328 KiB
4Accepted1ms316 KiB
5Accepted1ms320 KiB
6Accepted1ms316 KiB
7Accepted1ms320 KiB
subtask330/30
8Accepted1ms328 KiB
9Accepted1ms316 KiB
10Accepted1ms320 KiB
11Accepted1ms316 KiB
12Accepted1ms320 KiB
13Accepted1ms316 KiB
14Accepted1ms316 KiB
15Accepted1ms316 KiB
16Accepted1ms316 KiB
17Accepted1ms316 KiB
18Accepted1ms500 KiB
subtask450/50
19Accepted1ms316 KiB
20Accepted1ms512 KiB
21Accepted1ms328 KiB
22Accepted1ms316 KiB
23Accepted1ms320 KiB
24Accepted1ms316 KiB
25Accepted1ms320 KiB
26Accepted1ms316 KiB
27Accepted1ms316 KiB
28Accepted1ms316 KiB
29Accepted1ms316 KiB
30Accepted1ms316 KiB
31Accepted1ms500 KiB
32Accepted2ms508 KiB
33Accepted4ms316 KiB
34Accepted7ms344 KiB
35Accepted13ms596 KiB
36Accepted20ms568 KiB
37Accepted8ms492 KiB
38Accepted27ms564 KiB