Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++

#include <iostream>
using namespace std;
int main()
{
	long long n;
	cin>>n;
	int a[n];
	int i;
	for(i=0;i<n;i++){
		cin>>a[i];
	}
	int cem=0;
	for(i=0;i<n;i++){
		cem=cem+a[i];
	}	
	int cem1=(n*(n+1))/2;
	cout<<cem1-cem;
}
Source by cses.fi #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
2+7 =