제출 #397489

#제출 시각아이디문제언어결과실행 시간메모리
397489IwanttobreakfreeTarifa (COCI16_tarifa)C++98
50 / 50
1 ms208 KiB
#include <iostream>
using namespace std;
int main(){
	long long int tot=0,n,m,g;
	cin>>g;
	cin>>n;
	while(n--){
		tot+=g;
		cin>>m;
		int dif=tot-m;
		tot=dif;
		//cout<<tot<<' ';
	}
	cout<<tot+g;
}
#Verdict Execution timeMemoryGrader output
Fetching results...