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.
1 parent 9544fce commit 8b5721dCopy full SHA for 8b5721d
hackerrank/the-great-xor.py
@@ -0,0 +1,10 @@
1
+# !/bin/python
2
+# https://www.hackerrank.com/contests/w28/challenges/the-great-xor
3
+
4
+for query in xrange(int(raw_input().strip())):
5
+ x = long(raw_input().strip())
6
+ count = 0
7
+ for a in xrange(1, x):
8
+ if a^x > x:
9
+ count += 1
10
+ print count
0 commit comments