<filename>14_Miscellaneous/1.py
# https://www.hackerrank.com/challenges/flipping-bits/problem

#!/bin/python3

import math
import os
import random
import re
import sys

#
# Complete the 'flippingBits' function below.
#
# The function is expected to return a LONG_INTEGER.
# The function accepts LONG_INTEGER n as parameter.
#

def flippingBits(n): return n^4294967295

if __name__ == '__main__':
    fptr = open(os.environ['OUTPUT_PATH'], 'w')

    q = int(input().strip())

    for q_itr in range(q):
        n = int(input().strip())

        result = flippingBits(n)

        fptr.write(str(result) + '\n')

    fptr.close()
<filename>14_Miscellaneous/1.py
# https://www.hackerrank.com/challenges/flipping-bits/problem

#!/bin/python3

import math
import os
import random
import re
import sys

#
# Complete the 'flippingBits' function below.
#
# The function is expected to return a LONG_INTEGER.
# The function accepts LONG_INTEGER n as parameter.
#

def flippingBits(n): return n^4294967295

if __name__ == '__main__':
    fptr = open(os.environ['OUTPUT_PATH'], 'w')

    q = int(input().strip())

    for q_itr in range(q):
        n = int(input().strip())

        result = flippingBits(n)

        fptr.write(str(result) + '\n')

    fptr.close()
# https://www.hackerrank.com/challenges/flipping-bits/problem #!/bin/python3 # # Complete the 'flippingBits' function below. # # The function is expected to return a LONG_INTEGER. # The function accepts LONG_INTEGER n as parameter. #