제출 #44381

#제출 시각아이디문제언어결과실행 시간메모리
44381JustInCaseTarifa (COCI16_tarifa)C++17
50 / 50
2 ms948 KiB
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	
	int32_t x, n;
	cin >> x >> n;

	int32_t curr = 0;
	for(int32_t i = 1; i <= n; i++) {
		curr += x;

		int32_t p;
		cin >> p;

		curr -= p;
	}

	cout << curr + x << endl;
	return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...