fork download
  1. p2=[]
  2. p2.append(1)
  3. i=1;
  4. temp=2
  5. while i<=501:
  6. p2.append(temp)
  7. temp=temp<<1
  8. i=i+1
  9. t=int(input())
  10. while(t):
  11. t=t-1
  12. p=int(input())
  13. if(p==0):
  14. print "1"
  15. else:
  16. print (p2[p+1]-1)%1298074214633706835075030044377087
Success #stdin #stdout 0.01s 7900KB
stdin
3
0
1
500
stdout
1
3
2271255364075488568831