We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents aed0d5c + 5ad4e0a commit f8f4c33Copy full SHA for f8f4c33
python/SanketKN/SanketKN_missing_number.py
@@ -0,0 +1,11 @@
1
+#Missing Number
2
+#You are given all numbers between 1,2,…,n except one.
3
+#Your task is to find the missing number.
4
+#problem link: https://cses.fi/problemset/task/1083
5
+#user id: SanketKN
6
+#cses user link: https://cses.fi/user/33432
7
+
8
+x = int(input())
9
+n = list(map(int,input().split()))[:x-1]
10
+y = (x*(x+1)//2)-sum(n)
11
+print(y)
0 commit comments