답안 #622860

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
622860 2022-08-04T17:10:22 Z inksamurai Tarifa (COCI16_tarifa) C++17
50 / 50
1 ms 328 KB
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
#define _3SgiE60 ios::sync_with_stdio(0),cin.tie(0)
void print(){cout<<'\n';}
template<class h,class...t>
void print(const h&v,const t&...u){cout<<v<<' ',print(u...);}
// e

signed main(){
_3SgiE60;
	int x;
	cin>>x;
	int n;
	cin>>n;
	int pre=0;
	rep(i,n){
		int v;
		cin>>v;
		pre=pre-v+x;
	}
	print(pre+x);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 328 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct