ZhenlongDai/ACPR huggingface dataset:
Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a,b,c = map(int, input().split())
if a < b and a < c and b < c:
     print("Yes")
print("No")

Failing test case input:
1 6 8

Expected output:
Yes


Actual output:
Yes
No


Fixed submission (verdict: Accepted):
a,b,c = map(int, input().split())
if a < b and b < c:
                    print("Yes")
else:
                    print("No")

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a, b, c = input().split()
a = int(a)
b = int(b)
c = int(c)

if a < b:
    if b < c: print('Yes')
else:
    print('No')
    
    


Failing test case input:
1 12 0

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
a, b, c = input().split()
a = int(a)
b = int(b)
c = int(c)

if a < b and b < c:
    print('Yes')
else:
    print('No')

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a, b ,c = map(int, input().split())

if (max(a,b,c)==c) & (max(a,b)==b):
    print('Yes')
else:
    print('No')


Failing test case input:
0 9 9

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())

if (a < b < c):
    print('Yes')
else:
    print('No')

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
import sys

arr = list(map(int, input().split()))

last = None
for i in arr:
	if last == None:
		last = i
		continue
	
	if i < last:
		print("No")
		sys.exit()
		
	last = i

print("Yes")



Failing test case input:
0 6 6

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import sys

arr = list(map(int, input().split()))

last = None
for i in arr:
	if last == None:
		last = i
		continue
	
	if i <= last:
		print("No")
		sys.exit()
		
	last = i

print("Yes")

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a, b, c = input().split()
a = int(a)
b = int(b)
c = int(c)

if a < b:
    if b < c:
        print('Yes')
else:
    print('No')
    
    


Failing test case input:
9 16 5

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
a, b, c = input().split()
a = int(a)
b = int(b)
c = int(c)

if a < b and b < c:
    print('Yes')
else:
    print('No')

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a, b, c = map(int, input().split())
if a < b < c:
  print('yes')
else:
  print('no')

Failing test case input:
10 8 5

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
if a < b < c:
  print('Yes')
else:
  print('No')

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a,b,c=map(int,input().split())
if a < b < c:
    print("a < b < c")


Failing test case input:
9 16 5

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
if a < b < c:
 print("Yes")
else:
 print("No")
Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):

s = input().split()
a=int(s[0])
b=int(s[1])
c=int(s[2])
if(a<b<c):
    print ("YES")
else:
    print ("NO")

Failing test case input:
18 16 5

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):

s = input().split()
a=int(s[0])
b=int(s[1])
c=int(s[2])
if(a<b<c):
    print ("Yes")
else:
    print ("No")

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a,b,c = input().split()

a = int(a)
b = int(b)
c = int(c)

if a < b < c:
    print("yes")
else:
    print("no")


Failing test case input:
0 4 1

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
a,b,c = input().split()

a = int(a)
b = int(b)
c = int(c)

if a < b < c:
    print("Yes")
else:
    print("No")

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
A,B,C = map(int,input().split())
if A < B < C:
    print("Yes")
print("No")


Failing test case input:
0 6 8

Expected output:
Yes


Actual output:
Yes
No


Fixed submission (verdict: Accepted):
A,B,C = map(int,input().split())
if C > B and C > A and B > A:
    print("Yes")
else:
    print("No")

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a, b, c = map(int, input().split())
if a < b and b < c:
  print('yes')
else:
  print('no')

Failing test case input:
1 6 9

Expected output:
Yes


Actual output:
yes


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
if a < b < c:
  print('Yes')
else:
  print('No')

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a, b, c = map(int, input().split())
if a < b < c:
  print('yes')
else:
 print('no')

Failing test case input:
0 6 6

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
if a < b < c:
  print('Yes')
else:
 print('No')

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a, b, c=input().split()
if 'a < b < c' :
    print( 'Yes' )
else :
    print( 'No' )


Failing test case input:
4 5 2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c=input().split()
if a < b < c :
    print('Yes')
else :
    print('No')

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a,b,c = input().split()

a = int(a)
b = int(b)
c = int(c)

if a <= b < c:
    print("yes")
else:
    print("no")


Failing test case input:
10 8 5

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
a,b,c = input().split()

a = int(a)
b = int(b)
c = int(c)

if a < b < c:
    print("Yes")
else:
    print("No")

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a,b,c = input().split(' ')
a=int(a)
b=int(b)
c=int(c)
ret="Yes" if a<b<c else "No"

Failing test case input:
4 5 2

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
a,b,c = input().split(' ')
a=int(a)
b=int(b)
c=int(c)
ret="Yes" if a<b<c else "No"
print(ret)
Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
from sys import stdin

a, b, c = (int(n) for n in stdin.readline().rsplit())

answer = "YES" if a < b < c else "NO"

print(answer)



Failing test case input:
1 12 0

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
from sys import stdin

a, b, c = (int(n) for n in stdin.readline().rsplit())

answer = "Yes" if a < b < c else "No"

print(answer)

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a,b,c=map(int,input().split())
if a < b < c:
    print("Yes")
else:
    print("NO")

Failing test case input:
0 4 1

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
if a < b and b < c:
    print("Yes")
else:
    print("No")

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a, b, c = map(int, input(). split())

if a < b < c:
  print('YES')

else:
  print('NO')


Failing test case input:
1 8 9

Expected output:
Yes


Actual output:
YES


Fixed submission (verdict: Accepted):
a, b, c = map(int, input(). split())

if a < b < c:
  print('Yes')

else:
  print('No')

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
ins=input().split()
a=int(ins[0])
b=int(ins[1])
c=int(ins[2])

if a<b and b<c:
    print("Yse")
else:
    print("No")



Failing test case input:
1 8 9

Expected output:
Yes


Actual output:
Yse


Fixed submission (verdict: Accepted):
ins=input().split()
a=int(ins[0])
b=int(ins[1])
c=int(ins[2])

if a<b and b<c:
    print("Yes")
else:
    print("No")

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):



a, b, c = [int(x) for x in input().split()]
if a < b and b < c:
    print('YES')
else:
    print('NO')


Failing test case input:
1 6 9

Expected output:
Yes


Actual output:
YES


Fixed submission (verdict: Accepted):



a, b, c = [int(x) for x in input().split()]
if a < b and b < c:
    print('Yes')
else:
    print('No')

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a,b,c = map(int, input().split())
if a > b > c:
 print("Yes")
else:
 print("No")



Failing test case input:
12 9 2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b,c = map(int, input().split())
if a < b < c:
 print("Yes")
else:
 print("No")

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a, b, c = [int(i) for i in input().split()]
if a < b < c:
    print("yes")
else:
    print("no")

Failing test case input:
3 11 2

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
a, b, c = [int(i) for i in input().split()]
if a < b < c:
    print("Yes")

else:
    print("No")

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a = input().split()
if a[0] < a[1] < a[0]:
  print('Yes')
else:
  print('No')

Failing test case input:
0 6 8

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a = input().split()
if a[0] < a[1] < a[2]:
  print('Yes')
else:
  print('No')
Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a, b, c = map(int, input().split())
if a < b and b < c:
    ans = 'YES'
else:
    ans = 'NO'
print(ans)


Failing test case input:
4 14 2

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
if a < b and b < c:
    ans = 'Yes'
else:
    ans = 'No'
print(ans)

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a,b,c = list(map(int,input().split()))
if a<=b<=c:
    print("Yes")
else:
    print("No")


Failing test case input:
0 6 6

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b,c = list(map(int,input().split()))
if a<b<c:
    print("Yes")
else:
    print("No")

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a,b,c=map(int,input().split())
if a < b and b < c:
    print('YES')
else:
    print('NO')

Failing test case input:
1 8 9

Expected output:
Yes


Actual output:
YES


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
if a < b and b < c:
    print('Yes')
else:
    print('No')

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a = input()
b = a.split(' ')
c = int(b[0])
d = int(b[1])
e = int(b[2])
if c <= d <= e:
    print('Yes')
else:
    print('NO')

Failing test case input:
0 9 9

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a = input()
b = a.split(' ')
c = int(b[0])
d = int(b[1])
e = int(b[2])
if c < d < e:
    print('Yes')
else:
    print('No')

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a = input()
b = a.split(' ')
c = int(b[0])
d = int(b[1])
e = int(b[2])
if c < d < e:
    print('Yes')
else:
    print('NO')
    

Failing test case input:
12 5 2

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
a = input()
b = a.split(' ')
c = int(b[0])
d = int(b[1])
e = int(b[2])
if c < d < e:
    print('Yes')
else:
    print('No')

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a, b, c = map(int, input().split())
if a<b:
  if b<c:
    print('Yes')
  else:
    print('No')


Failing test case input:
10 8 5

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
if a<b:
  if b<c:
    print("Yes")
  else:
    print("No")
else:
    print("No")

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a, b, c=input().split()
if 'a < b < c' :
    print("Yes")
else :
    print("No")


Failing test case input:
3 9 3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c=input().split()
if a < b < c :
    print('Yes')
else :
    print('No')

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
nums = input().split()
a = int(nums[0])
b = int(nums[1])
c = int(nums[2])
if a < b < c:
     print(a, b, c)

Failing test case input:
10 8 5

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
nums = input().split()
a = int(nums[0])
b = int(nums[1])
c = int(nums[2])
if a < b < c:
     print('Yes')
else:
     print('No')
Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a,b,c=map(int,input().split())
if a < b and b < c:
    print("Yes")
else:
    print("NO")

Failing test case input:
3 9 3

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
if a < b and b < c:
    print("Yes")
else:
    print("No")

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a, b, c = map(int, input().split())
if a < b < c:
    print("yes")
else:
    print("no")


Failing test case input:
3 9 3

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
if a < b < c:
    print("Yes")
else:
    print("No")

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
input = input().strip().split()
 
a = int(input[0])
b = int(input[1])
c = int(input[2])
 
if a>b>c:
    print("Yes")
else:
    print("No")

Failing test case input:
1 8 9

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
input = input().strip().split()
 
a = int(input[0])
b = int(input[1])
c = int(input[2])
 
if a<b<c:
    print("Yes")
else:
    print("No")

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):

data = input()
data = list(map(int,data.split(" ")))

if data[0] < data[1]:
    if data[1] < data[2]:
        print("Yes")

else:
    print("No")

Failing test case input:
4 14 2

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):

data = input()
data = list(map(int,data.split(" ")))

if data[0] < data[1]:
    if data[1] < data[2]:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
def main():
    a,b,c=map(int,input().split())
    if a<b<c:
        print('yes')
    else:
        print('No')
        
if __name__=='__main__':
    main()


Failing test case input:
1 8 9

Expected output:
Yes


Actual output:
yes


Fixed submission (verdict: Accepted):
def main():
    a,b,c=map(int,input().split())
    if a<b<c:
        print('Yes')
    else:
        print('No')
        
if __name__=='__main__':
    main()

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a, b ,c = map(int, input().split())
if a < b < c:
    print('Yes')


Failing test case input:
2 12 0

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
a, b ,c = map(int, input().split())
if a < b < c:
    print('Yes')
else:
    print('No')

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a, b ,c = map(int, input().split())
if a < b:
    if b < c:
        print("YES")
    else:
        print("NO")
else:
    print('NO')


Failing test case input:
11 3 3

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
a, b ,c = map(int, input().split())
if a < b:
    if b < c:
        print("Yes")
    else:
        print("No")
else:
    print("No")
Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):

a ,b ,c = map(int, input().split())

if (a < b) and (b < c) and (a < c):
    print ("Yes")
else:
    print ("NO") 

Failing test case input:
4 5 2

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
a,b,c = map(int, input().split())

if a < b < c:
    print("Yes")
else:
    print("No")

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a, b, c=input().split()
if 'a < b < c' :
    print( "Yes" )
else :
    print( "No" )


Failing test case input:
18 9 5

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c=input().split()
if a < b < c :
    print('Yes')
else :
    print('No')

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):


a,b,c = map(int,input().split())
if a < b:
    if b < c:
        print("YES")
    else:
        print("NO")
else:
    print("NO")

Failing test case input:
3 9 3

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):


a,b,c = map(int,input().split())
if a < b and a < c:
    if b < c:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a,b,c=map(int,input().split())

if a<b and b<c:
    print("YES")
else:
    print("NO")


Failing test case input:
0 9 9

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())

if a<b and b<c:
    print("Yes")
else:
    print("No")

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a,b,c=map(int,input().split())
if a<b<c:
    print("Yse")
else:
    print("No")

Failing test case input:
1 6 9

Expected output:
Yes


Actual output:
Yse


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
if a<b<c:
    print("Yes")
else:
    print("No")

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
inputStr = input()
numList = inputStr.split(' ')
numList = [int(x) for x in numList]
numList2 = numList.copy()
numList.sort()

print('numList: ',numList)
print('numList2: ', numList2)

if numList == numList2:
    print('Yes')
else:
    print('No')

Failing test case input:
12 5 2

Expected output:
No


Actual output:
numList:  [2, 5, 12]
numList2:  [12, 5, 2]
No


Fixed submission (verdict: Accepted):
inputStr = input()
numList = inputStr.split(' ')
numList = [int(x) for x in numList]
numList2 = numList.copy()
numList.sort()
numSet = set(numList)




if numList == numList2 and len(numList)==len(numSet):
    print('Yes')
else:
    print('No')

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a,b,c=map(int,input().split())
if a < b < c:
 print("a < b < c")


Failing test case input:
2 7 4

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
if a < b < c:
 print("Yes")
else:
 print("No")
Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
nums = input().split()
a = int(nums[0])
b = int(nums[0])
c = int(nums[0])
if a < b < c:
     print(a, b, c)

Failing test case input:
9 16 5

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
nums = input().split()
a = int(nums[0])
b = int(nums[1])
c = int(nums[2])
if a < b < c:
     print('Yes')
else:
     print('No')

Problem: p02392
Buggy submission (Python3, verdict: Wrong Answer):
a = input()
b = a.split(' ')
c = int(b[0])
d = int(b[1])
e = int(b[2])
if c < d < e:
    print('Yes')
else:
    print('NO')

Failing test case input:
1 12 0

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
a = input()
b = a.split(' ')
c = int(b[0])
d = int(b[1])
e = int(b[2])
if c < d < e:
    print('Yes')
else:
    print('No')
Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
ans=[]
if n==0:
    print(0)
    exit()
    
for i in range(100):
    if  n==0:
        break
    if n%(2**(i+1))==0:
        ans.append('0')
    else:
        if i%2==0:
            n-=2**i
        else:
            n+=2**i
        ans.append('1')

print(''.join(map(str, ans)))

Failing test case input:
240699

Expected output:
1001111110001001111


Actual output:
1111001000111111001


Fixed submission (verdict: Accepted):
n=int(input())
ans=[]
if n==0:
    print(0)
    exit()
    
for i in range(100):
    if  n==0:
        break
    if n%(2**(i+1))==0:
        ans.append('0')
    else:
        if i%2==0:
            n-=2**i
        else:
            n+=2**i
        ans.append('1')
ans.reverse()
print(''.join(map(str, ans)))

Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=int(input())
b=[]
while a:
	print(str(a)+' '+str(a&1))
	b.append(a&1)
	a=int((a-(a&1))/(-2))
print(''.join(map(str,b)))

Failing test case input:
1838994

Expected output:
11011000001000010010110


Actual output:
1838994 0
-919497 1
459749 1
-229874 0
114937 1
-57468 0
28734 0
-14367 1
7184 0
-3592 0
1796 0
-898 0
449 1
-224 0
112 0
-56 0
28 0
-14 0
7 1
-3 1
2 0
-1 1
1 1
01101001000010000011011


Fixed submission (verdict: Accepted):
a=int(input())
b=[]
if a==0:
	print(0)
while a:
	b.append(a&1)
	a-=a&1
	a=int(a/-2)

print(''.join(map(str,b[::-1])))

Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def getBaseM2Num(n):
  if n == 0:
    return 0
  
  
  base = 1
  b2 = []
  while n != 0:
    if n % (2*base) == 0:
      
      b2.insert(0,"0")
    else:
      
      b2.insert(0,"1")
      n -= base
      
    base *= -2
  print(b2)  
  return "".join(b2)

n = int(input())
print(getBaseM2Num(n))

Failing test case input:
38694

Expected output:
11110101101111010


Actual output:
['1', '1', '1', '1', '0', '1', '0', '1', '1', '0', '1', '1', '1', '1', '0', '1', '0']
11110101101111010


Fixed submission (verdict: Accepted):
def getBaseM2Num(n):
  if n == 0:
    return 0
  
  
  base = 1
  b2 = []
  while n != 0:
    if n % (2*base) == 0:
      
      b2.insert(0,"0")
    else:
      
      b2.insert(0,"1")
      n -= base
      
    base *= -2

  return "".join(b2)


n = int(input())
print(getBaseM2Num(n))
Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
if N == 0:
    print(0)
else:
    li = []
    ind = 0
    while N != 0:
        if N % 2**(ind + 1) == 0:
            li.insert(0,0)
            ind += 1
        else:
            li.insert(0,1)
            N -= (-2)**(ind)
            ind += 1            
            x = ''.join([str(li[i]) for i in range(len(li))])
            print(x)

Failing test case input:
208967441

Expected output:
11101101101011110101100010001


Actual output:
1
10001
100010001
1100010001
101100010001
10101100010001
110101100010001
1110101100010001
11110101100010001
1011110101100010001
101011110101100010001
1101011110101100010001
101101011110101100010001
1101101011110101100010001
101101101011110101100010001
1101101101011110101100010001
11101101101011110101100010001


Fixed submission (verdict: Accepted):
N = int(input())
if N == 0:
    print(0)
else:
    li = []
    ind = 0
    while N != 0:
        if N % 2**(ind + 1) == 0:
            li.insert(0,0)
            ind += 1
        else:
            li.insert(0,1)
            N -= (-2)**(ind)
            ind += 1            
    x = ''.join([str(li[i]) for i in range(len(li))])
    print(x)

Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

def main():
	n = int(input())
	ans = ""

	i = 0
	while n != 0:
		print(n)
		if n % (2 ** (i + 1)) != 0:
			ans += "1"
			n -= (-2) ** i
		else:
			ans += "0"

		i += 1

	if n == 0:
		print(0)
	else:
		print(ans[::-1])

if __name__ == '__main__':
	main()

Failing test case input:
22841110

Expected output:
110101011011001101101101010


Actual output:
22841110
22841110
22841112
22841112
22841120
22841120
22841152
22841088
22841088
22840832
22841344
22841344
22843392
22839296
22839296
22839296
22872064
22806528
22806528
22544384
23068672
23068672
25165824
25165824
33554432
33554432
67108864
0


Fixed submission (verdict: Accepted):
import math

def main():
	n = int(input())
	ans = ""

	i = 0

	if n == 0:
		print(0)
		return 

	while n != 0:
		if n % (2 ** (i + 1)) != 0:
			ans += "1"
			n -= (-2) ** i
		else:
			ans += "0"

		i += 1

	print(ans[::-1])

if __name__ == '__main__':
	main()

Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
i=0
b=[]
q=n
ans=""

while 1:
  r=q%(-2)
  q=int(q/(-2)+0.5)
  
  if q==0:
    b.append(1)
    break
  if r==0:
    b.append(0)
  else:
    b.append(1)
  i=i+1

b.reverse()
for j in range(i+1):
  ans=ans+str(b[j])
  
print(ans)


Failing test case input:
175198680

Expected output:
11111101100010101011000101000


Actual output:
100001110010101100011010010


Fixed submission (verdict: Accepted):
n=int(input())
i=0
b=[]
q=n
ans=""

while 1:
  r=q%(-2)
  if q==0:
    b.append(0)
    break
 
  if r==0:
    b.append(0)
    q=int(q/(-2))
  else:
    b.append(1)
    q=int(q/(-2)+0.5)
    if q==0:
      break
  i=i+1

b.reverse()
for j in range(i+1):
  ans=ans+str(b[j])
  
print(ans)
Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = int(input())
if a == 0:
    print("0")
else:
    digits = []*10
    base = 1
    i = 0
    while a != 0:
        if a%(base*2) == 0:
            digits.append('0')
        else:
            digits.append('1')
            a -= base
        i += 0
        base *= -2
    print(''.join(digits))


Failing test case input:
1595137

Expected output:
11010011010101100000001


Actual output:
10000000110101011001011


Fixed submission (verdict: Accepted):
a = int(input())
if a == 0:
    print("0")
else:
    digits = []*10
    base = 1
    i = 0
    while a != 0:
        if a%(base*2) == 0:
            digits.append('0')
        else:
            digits.append('1')
            a -= base
        i += 0
        base *= -2
    print(''.join(digits[::-1]))

Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
if n == 0:
    print(0)
else:
    d = 0
    pows = [(0, 1)]
    for i in range(1, 40):
        a, b = pows[i-1]
        if i%2 == 1:
            min_ = b-2**(i+1)+1
            pows.append((min_, min_+2**i-1))
        else:
            max_ = a+2**(i+1)-1
            pows.append((max_-2**i+1, max_))
    

    ans = ''
    d = len(pows)-1
    for p in pows[::-1]:
        pmin, pmax = p
        if n >= pmin and n <= pmax:
            ans = '1'+ans
            n -= (-2)**d
            
        else:
            ans = '0'+ans

        d -= 1
    print(ans.rstrip('0')[::-1])

Failing test case input:
2643092

Expected output:
11110000101010110010100


Actual output:
11110000101010110010101


Fixed submission (verdict: Accepted):
n = int(input())
if n == 0:
    print(0)
else:
    d = 0
    pows = [(0, 1)]
    for i in range(1, 50):
        a, b = pows[i-1]
        if i%2 == 1:
            min_ = b-2**(i+1)+1
            pows.append((min_, min_+2**i-1))
        else:
            max_ = a+2**(i+1)-1
            pows.append((max_-2**i+1, max_))
    pows[0] = (1, 1)
    

    ans = ''
    d = len(pows)-1
    for p in pows[::-1]:
        pmin, pmax = p
        if n >= pmin and n <= pmax:
            ans += '1'
            n -= (-2)**d
            
        else:
            ans += '0'

        d -= 1
    print(ans.lstrip('0'))
Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

N = int(input())

if N == 0:
    print('0')
else:

    idx = 0
    while True:
        idx += 1
        left = sum([(-2)**i for i in range(idx+1) if i%2==1])
        right = sum([(-2)**i for i in range(idx+1) if i%2==0])
        if left <= N <= right:
            break

    max_idx = idx
    coeff = [0 for _ in range(max_idx+1)]
    for idx in range(max_idx, 0-1, -1):
        left = sum([(-2)**i for i in range(idx) if i%2==1])
        right = sum([(-2)**i for i in range(idx) if i%2==0])
        print(left, N, right)
        if not left <= N <= right:
            N -= (-2)**(idx)
            coeff[idx] = 1
    
    
    print(''.join(map(str, reversed(coeff))))

Failing test case input:
3681228

Expected output:
10010000111110011011100


Actual output:
-2796202 3681228 1398101
-699050 -513076 1398101
-699050 -513076 349525
-174762 -513076 349525
-174762 11212 87381
-43690 11212 87381
-43690 11212 21845
-10922 11212 21845
-10922 11212 5461
-2730 -5172 5461
-2730 3020 1365
-682 -1076 1365
-682 972 341
-170 -52 341
-170 -52 85
-42 -52 85
-42 76 21
-10 12 21
-10 12 5
-2 -4 5
-2 4 1
0 0 1
0 0 0
10010000111110011011100


Fixed submission (verdict: Accepted):

N = int(input())

if N == 0:
    print('0')
else:

    idx = 0
    while True:
        idx += 1
        left = sum([(-2)**i for i in range(idx+1) if i%2==1])
        right = sum([(-2)**i for i in range(idx+1) if i%2==0])
        if left <= N <= right:
            break

    max_idx = idx
    coeff = [0 for _ in range(max_idx+1)]
    for idx in range(max_idx, 0-1, -1):
        left = sum([(-2)**i for i in range(idx) if i%2==1])
        right = sum([(-2)**i for i in range(idx) if i%2==0])

        if not left <= N <= right:
            N -= (-2)**(idx)
            coeff[idx] = 1
    
    
    print(''.join(map(str, reversed(coeff))))

Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
i = 1
s = []
while n!=0:
    if n%2**i>0:
        s.append('1')
        n -= (-2)**(i-1)
    else:
        s.append('0')
    i += 1
if n==0:
    print('0')
else:
    print(''.join(s[::-1]))

Failing test case input:
22841110

Expected output:
110101011011001101101101010


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
if n==0:
    print('0')
    exit(0)
i = 1
s = []
while n!=0:
    if n%2**i>0:
        s.append('1')
        n -= (-2)**(i-1)
    else:
        s.append('0')
    i += 1
print(''.join(s[::-1]))
Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

N = int(input())

k = 0
S = []
while 1:
    print(k, N)
    if N % 2 == 0:
        S.append(0)
    else:
        N -= (-1) ** k
        S.append(1)
    N /= 2
    k += 1
    if N == 0:
        break

for i in S[::-1]:
    sys.stdout.write(str(i))
sys.stdout.write('\n')


Failing test case input:
2408233

Expected output:
11001011100001101111001


Actual output:
0 2408233
1 1204116.0
2 602058.0
3 301029.0
4 150515.0
5 75257.0
6 37629.0
7 18814.0
8 9407.0
9 4703.0
10 2352.0
11 1176.0
12 588.0
13 294.0
14 147.0
15 73.0
16 37.0
17 18.0
18 9.0
19 4.0
20 2.0
21 1.0
22 1.0
11001011100001101111001


Fixed submission (verdict: Accepted):
import sys

N = int(input())

k = 0
S = []
while 1:
    if N % 2 == 0:
        S.append(0)
    else:
        N -= (-1) ** k
        S.append(1)
    N /= 2
    k += 1
    if N == 0:
        break

for i in S[::-1]:
    sys.stdout.write(str(i))
sys.stdout.write('\n')
Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
number = int(input())

def to_bin(n):
    if n == 0:
        return 0
    
    digits = []
    i = 0
    base = 1
    while n != 0:
        print(i, n, base, digits)
        if n % (base * 2) == 0:
            digits.append('0')
        else:
            digits.append('1')
            n -= base
        i+= 1
        base *= -2
    return digits[::-1]

print(to_bin(number))

Failing test case input:
104959

Expected output:
1101110111000000011


Actual output:
0 104959 1 []
1 104958 -2 ['1']
2 104960 4 ['1', '1']
3 104960 -8 ['1', '1', '0']
4 104960 16 ['1', '1', '0', '0']
5 104960 -32 ['1', '1', '0', '0', '0']
6 104960 64 ['1', '1', '0', '0', '0', '0']
7 104960 -128 ['1', '1', '0', '0', '0', '0', '0']
8 104960 256 ['1', '1', '0', '0', '0', '0', '0', '0']
9 104960 -512 ['1', '1', '0', '0', '0', '0', '0', '0', '0']
10 105472 1024 ['1', '1', '0', '0', '0', '0', '0', '0', '0', '1']
11 104448 -2048 ['1', '1', '0', '0', '0', '0', '0', '0', '0', '1', '1']
12 106496 4096 ['1', '1', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1']
13 106496 -8192 ['1', '1', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '0']
14 114688 16384 ['1', '1', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '0', '1']
15 98304 -32768 ['1', '1', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '0', '1', '1']
16 131072 65536 ['1', '1', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '0', '1', '1', '1']
17 131072 -131072 ['1', '1', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '0', '1', '1', '1', '0']
18 262144 262144 ['1', '1', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '0', '1', '1', '1', '0', '1']
['1', '1', '0', '1', '1', '1', '0', '1', '1', '1', '0', '0', '0', '0', '0', '0', '0', '1', '1']


Fixed submission (verdict: Accepted):
number = int(input())

def to_bin(n):
    if n == 0:
        return [0]
    
    digits = []
    i = 0
    base = 1
    while n != 0:
        if n % (base * 2) == 0:
            digits.append('0')
        else:
            digits.append('1')
            n -= base
        i+= 1
        base *= -2
    return digits[::-1]

ans_list = to_bin(number)

for ans in ans_list:
    print(ans, end='')

Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())

ma = 50
result=[]
for i in range(ma):
  if n==(-2**i):
    result.append("1")
    break
  
  if (n%(2**(i+1)))==0:
    result.append("0")
  else:
    result.append("1")
    n-=((-2)**i)

result.reverse()
head=0
for x in result:
  if x=="1":
    break
  if x=="0" and (len(result)-1)>head:
    head+=1

print("".join(result[head:]))
    

Failing test case input:
-44

Expected output:
11010100


Actual output:
1010100


Fixed submission (verdict: Accepted):
n = int(input())

ma = 50
result=[]
for i in range(ma):
  if n==((-2)**i):
    result.append("1")
    break
  
  if (n%(2**(i+1)))==0:
    result.append("0")
  else:
    result.append("1")
    n-=((-2)**i)

result.reverse()
head=0
for x in result:
  if x=="1":
    break
  if x=="0" and (len(result)-1)>head:
    head+=1

print("".join(result[head:]))
Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
invtwos = [1]
i = 0
while abs(invtwos[i]) <= 10**10:
    invtwos.append(invtwos[i]*(-2))
    i += 1
invtwos.append(invtwos[-1]*(-2))

n = int(input())
ans = []
i = 0
while n != 0:
    if n%abs(invtwos[i+1]) != 0:
        ans.append(1)
        n -= invtwos[i]
    else:
        ans.append(0)
    i += 1
ans.reverse()
if n == 0:
    print("0")
else:
    for i in range(len(ans)):
        if i != len(ans)-1:
            print(ans[i],end="")
        else:
            print(ans[i])

Failing test case input:
1347846

Expected output:
101011001000100011010


Actual output:
0


Fixed submission (verdict: Accepted):
invtwos = [1]
i = 0
while abs(invtwos[i]) <= 10**10:
    invtwos.append(invtwos[i]*(-2))
    i += 1
invtwos.append(invtwos[-1]*(-2))

n = int(input())
ans = []
i = 0
while n != 0:
    if n%abs(invtwos[i+1]) != 0:
        ans.append(1)
        n -= invtwos[i]
    else:
        ans.append(0)
    i += 1
ans.reverse()

if len(ans) == 0:
    print("0")
else:
    for i in range(len(ans)):
        if i != len(ans)-1:
            print(ans[i],end="")
        else:
            print(ans[i])

Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
ans=[]
if n==0:
    print(0)
    exit()
    
for i in range(100):
    if  n==0:
        break
    if n%(2**(i+1))==0:
        ans.append(0)
    else:
        if i%2==0:
            n-=2**i
        else:
            n+=2**i
        ans.append(1)
ans.reverse()
print(*ans)

Failing test case input:
60962

Expected output:
10011001001100110


Actual output:
1 0 0 1 1 0 0 1 0 0 1 1 0 0 1 1 0


Fixed submission (verdict: Accepted):
n=int(input())
ans=[]
if n==0:
    print(0)
    exit()
    
for i in range(100):
    if  n==0:
        break
    if n%(2**(i+1))==0:
        ans.append('0')
    else:
        if i%2==0:
            n-=2**i
        else:
            n+=2**i
        ans.append('1')
ans.reverse()
print(''.join(map(str, ans)))

Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())

m = 2
s = ""
sgn = 1
while N!=0:
    r = N % m
    s += "1" if r != 0 else "0"
    m *= -2
    N = N -r 
if N == 0:
    print(0)
else:
    print(s[::-1])


Failing test case input:
98235

Expected output:
1101000000011001111


Actual output:
0


Fixed submission (verdict: Accepted):
N=int(input())

if N == 0:
    print(0)
else:
    m = 2
    s = ""
    sgn = 1
    while N!=0:
        r = N % m
        s += "1" if r != 0 else "0"
        m *= -2
        N = N -r 
    print(s[::-1])
Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = []
div = -2
i = 0
while n!=0:
    r = n % div
    if r == 0:
        s.append(0)
    else:
        s.append(1)
        n -= (-2) ** i
    div *= 2
    i += 1
s = map(str, s)

print("".join(s))

Failing test case input:
-63

Expected output:
11000001


Actual output:
10000011


Fixed submission (verdict: Accepted):
n = int(input())
s = []
div = -2
i = 0
while n!=0:
    r = n % div
    if r == 0:
        s.append(0)
    else:
        s.append(1)
        n -= (-2) ** i
    div *= 2
    i += 1
ans = ""
for i in range(len(s)):
    ans =  str(s[i]) + ans
if ans != "":
    print(ans)
else:
    print(0)

Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
if N == 0:
    print('0')
else:
    k = 0
    ans = []
    while(True):
        if N % (-2) ** k == 0:
            ans.append('0')
        else:
            ans.append('1')
            N -= (-2) ** (k - 1)
        if N == 0:
            break
        else:
            k += 1
    print(''.join(ans[::-1]))

Failing test case input:
907016

Expected output:
100100010101100011000


Actual output:
1001000101011000110000


Fixed submission (verdict: Accepted):
N = int(input())
if N == 0:
    print('0')
else:
    k = 1
    ans = []
    while(True):
        if N % ((-2) ** k) == 0:
            ans.append('0')
        else:
            ans.append('1')
            N -= (-2) ** (k - 1)
        if N == 0:
            break
        else:
            k += 1
    print(''.join(ans[::-1]))

Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
ans = ""

while N != 0:
    if N % 2 != 0:
        N -= 1
        ans = "1" + ans
    else:
        ans = "0" + ans
        N /= -2
    if ans == "":
        ans = "0"

print(ans) 

Failing test case input:
2408233

Expected output:
11001011100001101111001


Actual output:
10100010010101000001010010101010001


Fixed submission (verdict: Accepted):
N = int(input())
ans = ""

while N != 0:
    if N % 2 != 0:
        N -= 1
        ans = "1" + ans
    else:
        ans = "0" + ans
    N /= -2
if ans == "":
    ans = "0"

print(ans)
Problem: p03286
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
if __name__ == "__main__":
    N = int(input())
    for bit in range(0, 1 << 20):
        ans = "0" * 64
        ans = list(ans)
        res = 0

        base = 1
        idx = 0
        tmp_bit = bit
        while (tmp_bit > 0):
            if tmp_bit % 2 != 0:
                res += base
                ans[idx] = '1'
            tmp_bit = tmp_bit >> 1
            base *= 4
            idx += 2
        if N > res:
            continue
        
    
        for x in range(41, 0, -2):
            base = 2 ** x
            base *= -1
            if res + base >= N:
                res += base
                ans[x] = '1'
        if res == N:
            ans = "".join(reversed(ans))
            for i in range(len(ans)):
                if ans[i] == '1':
                    print (ans[i:])
                    break
            break
    print (0)
    
            


Failing test case input:
3681228

Expected output:
10010000111110011011100


Actual output:
10010000111110011011100
0


Fixed submission (verdict: Accepted):
if __name__ == "__main__":
    N = int(input())
    for bit in range(0, 1 << 20):
        ans = "0" * 64
        ans = list(ans)
        res = 0

        base = 1
        idx = 0
        tmp_bit = bit
        while (tmp_bit > 0):
            if tmp_bit % 2 != 0:
                res += base
                ans[idx] = '1'
            tmp_bit = tmp_bit >> 1
            base *= 4
            idx += 2
        if N > res:
            continue
        
    
        for x in range(41, 0, -2):
            base = 2 ** x
            base *= -1
            if res + base >= N:
                res += base
                ans[x] = '1'
        if res == N:
            ans = "".join(reversed(ans))
            for i in range(len(ans)):
                if ans[i] == '1':
                    print (ans[i:])
                    exit(0)
            print (0)
            exit(0)

Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

n = int(input())

ma = 31
result=[]
for i in range(ma):
  if n==(-2**i):
    result.append("1")
    break
  
  if (n%(2**(i+1)))==0:
    result.append("0")
  else:
    result.append("1")
    n-=((-2)**i)

result.reverse()
print("".join(result))

Failing test case input:
-63

Expected output:
11000001


Actual output:
1000001


Fixed submission (verdict: Accepted):
n = int(input())

ma = 50
result=[]
for i in range(ma):
  if n==((-2)**i):
    result.append("1")
    break
  
  if (n%(2**(i+1)))==0:
    result.append("0")
  else:
    result.append("1")
    n-=((-2)**i)

result.reverse()
head=0
for x in result:
  if x=="1":
    break
  if x=="0" and (len(result)-1)>head:
    head+=1

print("".join(result[head:]))
Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
n = int(input())
s=[]
i=0
if n==0:
  print(0)
  sys.exit()
while n > 0:
  if n%(2**(i+1))!=0:
    a=1
  else:
    a=0
  s.append(a)
  n=n-a*(-2)**i
  i+=1

s.reverse()
m=""
for ss in s:
  m+=str(ss)
print(m)

Failing test case input:
-63

Expected output:
11000001


Actual output:

Fixed submission (verdict: Accepted):
import sys
n = int(input())
s=[]
i=0
if n==0:
  print(0)
  sys.exit()
while n != 0:
  if n%(2**(i+1))!=0:
    a=1
  else:
    a=0
  s.append(a)
  n=n-a*(-2)**i
  i+=1

s.reverse()
m=""
for ss in s:
  m+=str(ss)
print(m)

Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N = int(input())

def minus_2(n):
    ans = ''
    
    if n == 1:
        ans += '1'
    elif n == 0:
        ans += '0'
    else:
        for i in range(10**9):
            if n % 2 == 0:
                ans += '0'
            else:
                ans += '1'
            n = math.ceil(n/-2)
            if n == 1:
                break
            ans += '1'
            ans = ans[::-1]
        
    return ans

print(minus_2(N))

Failing test case input:
-63

Expected output:
11000001


Actual output:
1010101101011


Fixed submission (verdict: Accepted):
import math
N = int(input())
 
def minus_2(n):
    ans = ''
    if n == 1:
        ans += '1'
    elif n == 0:
        ans += '0'
    else:
        while n != 1:
            if n % 2 == 0:
                ans += '0'
            else:
                ans += '1'
            n = math.ceil(n/-2)
        ans += '1'
        ans = ans[::-1]
        
    return ans
 
print(minus_2(N))

Problem: p03286
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a=int(input())
sum=0
s=''
if a<0:
    b = abs(a)
    if b%2==1:
        b=b+1
        print(str(bin(b))[2:-1]+'1')
    else:
        print(str(bin(b))[2:-1])
elif a>0:
    while(a!=1):
        if a%(-2)==-1:
            s=s+'1'
            a=a-1
            a=a/-2
        else:
            s = s + '0'
            a=a/-2
    s=s+'1'
    for i in range(len(s)):
        print(s[len(s)-1-i],end='')
    print()
else:
    print(0)


Failing test case input:
-63

Expected output:
11000001


Actual output:
1000001


Fixed submission (verdict: Accepted):
a=int(input())
sum=0
s=''

if a!=0:
    while(a!=1):
        if a%(-2)==-1:
            s=s+'1'
            a=a-1
            a=a/-2
        else:
            s = s + '0'
            a=a/-2
    s=s+'1'
    for i in range(len(s)):
        print(s[len(s)-1-i],end='')
    print()
else:
    print(0)

Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
ans=''
i=1
k=n
while k>0:
    if n%(2**i)!=0:
        ans='1'+ans
        k-=(-2)**(i-1)
    else:
        ans='0'+ans
    i+=1
print(ans)

Failing test case input:
4778586

Expected output:
10110010011111110101110


Actual output:
1111111111111111111111110


Fixed submission (verdict: Accepted):
n=int(input())
if n==0:
    print(0)
    exit()
ans=''
i=1
k=n
while k!=0:
    if k%(2**i)!=0:
        ans='1'+ans
        k-=(-2)**(i-1)
    else:
        ans='0'+ans
    i+=1
print(ans)
Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=int(input())
b=[]
if a==0:
	print(0)
while a:
	b.append(a&1)
	a=int((a-(a&1))/(-2))
print(''.join(map(str,b)))

Failing test case input:
156427340

Expected output:
11001010101110010010001011100


Actual output:
00111010001001001110101010011


Fixed submission (verdict: Accepted):
a=int(input())
b=[]
if a==0:
	print(0)
while a:
	b.append(a&1)
	a-=a&1
	a=int(a/-2)

print(''.join(map(str,b[::-1])))

Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
ans = ''
for i in range(30):
    if n == 0:
        break
    if n % 2 ** (i + 1) == 0: 
        ans = ans + '0'
    else:
        n -= (-2)**i
        ans = ans + '1'
print(ans)

Failing test case input:
4778586

Expected output:
10110010011111110101110


Actual output:
01110101111111001001101


Fixed submission (verdict: Accepted):
n = int(input())
ant = 0
if n == 0:
    ant = 1
ans = ''
for i in range(10000):
    if n == 0:
        break
    if n % 2 ** (i + 1) == 0: 
        ans = '0' + ans
    else:
        n -= (-2)**i
        ans = '1' + ans
if ant == 0:
    print(ans)
else:
    print('0')

Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())

ma = 31
result=[]
for i in range(ma):
  if n==(-2**i):
    result.append("1")
    break
  
  if (n%(2**(i+1)))==0:
    result.append("0")
  else:
    result.append("1")
    n-=((-2)**i)

result.reverse()
head=0
for x in result:
  if x=="1":
    break
  if x=="0" and (len(result)-1)>head:
    head+=1

print("".join(result[head:]))
    

Failing test case input:
-44

Expected output:
11010100


Actual output:
1010100


Fixed submission (verdict: Accepted):
n = int(input())

ma = 50
result=[]
for i in range(ma):
  if n==((-2)**i):
    result.append("1")
    break
  
  if (n%(2**(i+1)))==0:
    result.append("0")
  else:
    result.append("1")
    n-=((-2)**i)

result.reverse()
head=0
for x in result:
  if x=="1":
    break
  if x=="0" and (len(result)-1)>head:
    head+=1

print("".join(result[head:]))

Problem: p03286
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = []
b = 0
while n != 0:
    c = (-2) ** b
    if n % (c*(-2)) != 0:
        n -= c
        a.append("1")
    else:
        a.append("0")
    b += 1
else:
    a.append("0")
ans = "".join(reversed(a))
print(ans)


Failing test case input:
38694

Expected output:
11110101101111010


Actual output:
011110101101111010


Fixed submission (verdict: Accepted):
n = int(input())
a = []
b = 0
while n != 0:
    c = (-2) ** b
    if n % (c*(-2)) != 0:
        n -= c
        a.append("1")
    else:
        a.append("0")
    b += 1
ans = "".join(reversed(a))
if ans == "":
  ans = 0
print(ans)