class Solution:
    """
    @param n: non-negative integer n.
    @return: return whether a binary representation of a non-negative integer n is a palindrome.
    """
    def isPalindrome(self, n):
        # Write your code here
        result = []
        if n==0 or n==1:
            return True
        while n>1:
            result.append(n%2)
            n = n//2
        result.append(1)
        length = len(result)
        count = 0
        while count<(length-count-1):
            if not result[count]==result[length-count-1]:
                return False
            count +=1
        return True

e3e7186f5d61a02c308fb54532ef1ed134f4c455
<mask token>

class Solution:
    <mask token>
    <mask token>

class Solution:
    <mask token>

    def isPalindrome(self, n):
        result = []
        if n == 0 or n == 1:
            return True
        while n > 1:
            result.append(n % 2)
            n = n // 2
        result.append(1)
        length = len(result)
        count = 0
        while count < length - count - 1:
            if not result[count] == result[length - count - 1]:
                return False
            count += 1
        return True

class Solution:
    """
    @param n: non-negative integer n.
    @return: return whether a binary representation of a non-negative integer n is a palindrome.
    """

    def isPalindrome(self, n):
        result = []
        if n == 0 or n == 1:
            return True
        while n > 1:
            result.append(n % 2)
            n = n // 2
        result.append(1)
        length = len(result)
        count = 0
        while count < length - count - 1:
            if not result[count] == result[length - count - 1]:
                return False
            count += 1
        return True

class Solution:
    """
    @param n: non-negative integer n.
    @return: return whether a binary representation of a non-negative integer n is a palindrome.
    """
    def isPalindrome(self, n):
        # Write your code here
        result = []
        if n==0 or n==1:
            return True
        while n>1:
            result.append(n%2)
            n = n//2
        result.append(1)
        length = len(result)
        count = 0
        while count<(length-count-1):
            if not result[count]==result[length-count-1]:
                return False
            count +=1
        return True
