Skip to content

Commit c366d73

Browse files
authored
Create Ai.cpp
1 parent a4dc3d4 commit c366d73

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Ai.cpp

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include <bits/stdc++.h>
2+
using namespace std;
3+
4+
int main() {
5+
// your code goes here
6+
long long int n;
7+
cin>>n;
8+
long long int count=0;
9+
long long int arr[n-1];
10+
for(int i=0;i<n-1;i++)
11+
{
12+
cin>>arr[i];
13+
count=count+arr[i];
14+
}
15+
cout<<(n*(n+1)/2)-count;
16+
return 0;
17+
}

0 commit comments

Comments
 (0)