Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Untitled
a guest
Oct 27th, 2016
67
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
text
0.21 KB
| None
|
0
0
raw
download
clone
embed
print
report
A= [1,3,1,4,2,3,5,4]
def solution(X, A):
checker=0
final_val=pow(2,5)-1
for x in range(len(A)):
checker=checker| 1<<(A[x]-1)
if(checker==final_val):
return x
return -1
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
Untitled
45 min ago | 4.86 KB
Untitled
45 min ago | 22.07 KB
Untitled
2 hours ago | 10.28 KB
Untitled
2 hours ago | 13.40 KB
Untitled
4 hours ago | 14.67 KB
Untitled
4 hours ago | 5.37 KB
OoT rando seed 5/1
5 hours ago | 68.67 KB
Untitled
6 hours ago | 14.93 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!