a = [1, 2, 4 ,6, 3, 7, 8]s = 0for i in a: s = s + iw = ((len(a) + 1) * ( len(a) + 2 ) )//2print(w-s)
Standard input is empty
5
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!