Problem:


Problem Statement

You are given two integers a and b (a≤b). Determine if the product of the integers a, a+1, …, b is positive, negative or zero.

Constraints

a and b are integers.

-10^9≤a≤b≤10^9

Partial Score

In test cases worth 100 points, -10≤a≤b≤10.

Input

The input is given from Standard Input in the following format:

a b

Output

If the product is positive, print Positive. If it is negative, print Negative. If it is zero, print Zero.

Sample Input 1

1 3

Sample Output 1

Positive

1×2×3=6 is positive.

Sample Input 2

-3 -1

Sample Output 2

Negative

(-3)×(-2)×(-1)=-6 is negative.

Sample Input 3

-1 1

Sample Output 3

Zero

(-1)×0×1=0.



Sample input:
1 3


Sample output:
Positive

Submission status: Time Limit Exceeded

Solution code:
a,b=map(int,input().split())
import sys
ans=1

for i in range(a,b+1):
    if i == 0:
        print('Zero')
        sys.exit()
    ans*=i
    
if 0 < ans:
    print('Positive')
elif ans == 0:
    print('Zero')
else:
    print('Negative')

Submission status: Time Limit Exceeded

Solution code:
a,b=map(int,input().split())

ans=1
for i in range(a,b+1):
    ans*=i
    
if 0 < ans:
    print('Positive')
elif ans == 0:
    print('Zero')
else:
    print('Negative')

Submission status: Time Limit Exceeded

Solution code:
import sys
import os
if sys.platform=="darwin":
	base = os.path.dirname(os.path.abspath(__file__))
	name = os.path.normpath(os.path.join(base, '../Documents/input.txt'))
	#print(name)
	sys.stdin = open(name)

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

ans = 1

for i in range(a,b+1):
	#print(i)
	ans = i*ans

if ans > 0:
	print("Positive")
elif ans == 0:
	print("Zero")
else:
	print("Negative")

Submission status: Time Limit Exceeded

Solution code:
a,b=map(int,input().split())
aa=[a,b]
for i in range(a,b):
  if not i in aa:
    aa.append(i)
z=aa.count(0)
n=sum([1 for i in aa if i<0])%2
if z>0:
  print('Zero')
elif n==0:
  print("Positive")
else:
  print("Negative")

Submission status: Time Limit Exceeded

Solution code:
a,b=map(int,input().split())
ans=a
for i in range(a+1, b+1):
  ans *= i
if ans > 0:
  print("Positive")
elif ans == 0:
  print("Zero") 
else:
  print("Negative")

Submission status: Time Limit Exceeded

Solution code:
a, b = map(int, input().split())
ans = 1
for i in range(a, b+1):
  ans *= i
if ans < 0:
  print("Negative")
elif ans > 0:
  print("Positive")
else:
  print("Zero")

Submission status: Time Limit Exceeded

Solution code:
a, b = map(int, input().split())

n = 0
for i in range(a, b+1):
  if i < 0:
    n += 1
  elif i == 0:
    print('Zero')
    exit()

if n%2 == 1:
  print('Negative')
else:
  print('Positive')

Submission status: Time Limit Exceeded

Solution code:
import sys
a,b = map(int,input().split())
if a > 0:
    print('Positive')
    sys.exit()
if b >= 0:
    print('Zero')
    sys.exit()
minus_count = 0
for i in range(a,b+1):
    if i < 0:
        minus_count += 1
if minus_count%2 == 1:
    print('Negative')
else:
    print('Positive')

Submission status: Time Limit Exceeded

Solution code:
import sys
a,b = map(int,input().split())
minus_count = 0
for i in range(a,b+1):
    if i == 0:
        print('Zero')
        sys.exit()
    if i < 0:
        minus_count += 1
if minus_count%2 == 1:
    print('Negative')
else:
    print('Positive')

Submission status: Time Limit Exceeded

Solution code:
import sys
a,b = map(int,input().split())
base = 1
if a > 0 and b > 0:
    print('Positive')
    sys.exit()
for i in range(a,b+1):
    if i == 0:
        print('Zero')
        sys.exit()
    base = base * i
if base > 0:
    print('Positive')
elif base < 0:
    print('Negative')

Submission status: Time Limit Exceeded

Solution code:
import sys
a,b = map(int,input().split())
base = 1
for i in range(a,b+1):
    if i == 0:
        print('Zero')
        sys.exit()
    base = base * i
if base > 0:
    print('Positive')
elif base < 0:
    print('Negative')

Submission status: Time Limit Exceeded

Solution code:
a,b = map(int,input().split())
base = 1
for i in range(a,b+1):
    base = base * i
if base > 0:
    print('Positive')
elif base < 0:
    print('Negative')
else:
    print('Zero')

Submission status: Time Limit Exceeded

Solution code:
a,b = map(int, input().split())
l = [i for i in range(a,b+1)]
ans =1
for i in range(len(l)):
  ans = ans *l[i]
if ans <0:
  print('Negative')
elif ans >0:
  print('Positive')
else:
  print('Zero')

Submission status: Time Limit Exceeded

Solution code:
a,b=map(int,input().split())
if a<=0 and b>=0:
    print('Zero')
elif a>0 and b>0:
    print('Positive')
elif a<0 and b<0:
    N=1
    for i in range(a,b+1,1):
        N=N*i
    if N>0:
        print("Positive")
    else:
        print("Negative")

Submission status: Time Limit Exceeded

Solution code:
import sys
input=sys.stdin.readline

def main():
    a,b = map(int,input().split())
    if a<=0 and 0<=b:
        print("Zero")
        return
    else:
        n = 0
        for i in range(a,b+1):
            if i<0:
                n += 1
        if n%2 == 1:
            print("Negative")
            return
        print("Positive")

if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
a,b = map(int,input().split())
count = [i for i in range(a,b+1) if i<0]
if 0 in [i for i in range(a,b+1)]:
    print("Zero")
elif len(count)%2==0:
    print("Positive")
else:
    print("Negative")

Submission status: Time Limit Exceeded

Solution code:
a, b = map(int, input().split())
ans = a

for i in range(ans, b):
    ans *= i
    
if ans > 0:
    print("Positive")
elif ans < 0:
    print("Negative")
else:
    print("Zero")

Submission status: Time Limit Exceeded

Solution code:
a, b = map(int, input().split())
res = 1
for i in range(a, b + 1):
    res *= i
if res > 0:
    print('Positive')
elif res == 0:
    print('Zero')
else:
    print('Negative')

Submission status: Time Limit Exceeded

Solution code:
a, b = map(int, input().split())
res = 1
for i in range(a, b + 1):
    res *= i
print('Positive' if res > 0 else 'Negative' if res < 0 else 'Zero')

Submission status: Time Limit Exceeded

Solution code:
a, b = map(int, input().split())
cnt = 1
for i in range(a, b+1):
    cnt *= i
if cnt < 0:
    print('Negative')
elif cnt == 0:
    print('Zero')
else:
    print('Positive')

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
a,b=map(int,input().split())
num=[x for x in range(a,b+1)]
p=np.prod(num)
if p>0:
    print('Positive')
elif p<0:
    print('Negative')
else:
    print('Zero')

Submission status: Time Limit Exceeded

Solution code:
a,b=map(int,input().split())
ans=1
for i in range(a,b+1):
    ans*=i
if ans==0:
    print("Zero")
else:
    print("Positive" if ans>0 else "Negative")

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
a,b= map(int,input().split())
List=[j for j in range(a,b+1)]
np.asarray(List)
if np.prod(List)>0:
    print("Positive")
elif np.prod(List)<0:
    print("Negative")
else:
    print("Zero")

Submission status: Time Limit Exceeded

Solution code:
import operator as o
import functools as f
a,b=map(int,input().split())
c=f.reduce(o.mul,range(a,b+1))
if c>0:
  print("Positive")
elif c<0:
  print("Negative")
else:
  print("Zero")

Submission status: Time Limit Exceeded

Solution code:
a,b = map(int,input().split())
po = []
ne = []
ze = []
for i in range(a,b+1):
    if i < 0:
        ne.append(1)
    elif i > 0:
        po.append(1)
    else:
        ze.append(1)

if sum(ze) != 0:
    print("Zero")
elif sum(ne) % 2 == 0:
    print("Positive")
else:
    print("Negative")

Submission status: Time Limit Exceeded

Solution code:
a,b=map(int, input().split())
s = 1
for i in range(a,b+1):
  s *= i
if s < 0:
  print("Negative")
elif s == 0:
  print("Zero")
else:print("Positive")

Submission status: Time Limit Exceeded

Solution code:
a,b=map(int,input().split())
l=range(a,b+1)
ans=1
for i in range(len(l)):
  ans=ans*l[i]
if ans>0:
  print("Positive")
elif ans<0:
  print("Negative")
else:
  print("Zero")

Submission status: Time Limit Exceeded

Solution code:
a,b=map(int,input().split())
l=range(a,b+1)
ans=1
for i in range(len(l)):
  ans=ans*l[i]
if ans>0:
  print("Positive")
if ans<0:
  print("Negative")
if ans==0:
  print("Zero")

Submission status: Time Limit Exceeded

Solution code:
a, b = list(map(int, input().split()))
ans = 1

for i in range(a, b + 1):
    ans *= i
else:
    if ans > 0:
        print("Positive")
    elif ans < 0:
        print("Negative")
    else:
        print("Zero")

Submission status: Time Limit Exceeded

Solution code:
a, b = list(map(int, input().split()))
ans = 1

for i in range(b - a + 1):
    ans *= (a + i)
else:
    if ans > 0:
        print("Positive")
    elif ans < 0:
        print("Negative")
    else:
        print("Zero")

Submission status: Time Limit Exceeded

Solution code:
a, b = map(int, input().split())

if a >0:
    print("Positive")
elif a < 1 and b >-1:
    print("Zero")
else:
    index=a
    count=0
    while index < b+1:
        if index <0:
            count+=1
        index+=1
    if count%2==0:
        print("Positive")
    else:
        print("Negative")

Submission status: Time Limit Exceeded

Solution code:
a, b = map(int, input().split())

ans = 1

for i in range(a, b + 1):
    if i == 0:
        print("Zero")
        exit(0)
    ans *= i

if ans > 0:
    print("Positive")

elif ans < 0:
    print("Negative")

else:
    print("Zero")

Submission status: Time Limit Exceeded

Solution code:
a, b = map(int, input().split())

ans = 1

for i in range(a, b + 1):
#    print(i)
    ans *= i

if ans > 0:
    print("Positive")

elif ans < 0:
    print("Negative")

else:
    print("Zero")

Submission status: Time Limit Exceeded

Solution code:
a, b = map(int, input().split())
c = 1

if a <= 0 and b >= 0:
    print("Zero")
else:
    for i in range(b - a + 1):
        if a + i < 0:
            c *= -1
    if c == 1:
        print("Positive")
    else:
        print("Negative")

Submission status: Time Limit Exceeded

Solution code:
a, b = map(int, input().split())
nega_cnt = 0
is_zero = False
for x in range(a, b+1):
        if x < 0:
                nega_cnt += 1

        elif x == 0:
                print("Zero")
                is_zero = True

if not is_zero:

        if nega_cnt % 2 == 1:
                print("Negative")
        else:
                print("Positive")

Submission status: Time Limit Exceeded

Solution code:
a, b = input().split()
a, b = int(a), int(b)

n = 1
for i in range(a, b + 1):
    n *= i

if n > 0:
    print("Positive")
elif n < 0:
    print("Negative")
else:
    print("Zero")

Submission status: Time Limit Exceeded

Solution code:
a,b=map(int,input().split())
minus=int(0)
for i in range(0,b-a+1):
    if a+i==0:
        print('Zero')
        exit()
    elif a+i<0:
        minus+=1
if minus%2==0:
    print('Positive')
else:
    print("Negative")

Submission status: Time Limit Exceeded

Solution code:
a,b=map(int,input().split())
ans=int(a)
for i in range(1,b-a+1):
    ans*=a+i
if ans==0:
    print('Zero')
elif ans<0:
    print('Negative')
elif ans>0:
    print('Positive')

Submission status: Time Limit Exceeded

Solution code:
a,b=map(int,input().split())
for x in range(-~a,-~b):a*=x
print(['Zero','Positive','Negative'][-1if a<0else bool(a)])

Submission status: Time Limit Exceeded

Solution code:
import math

a,b = tuple(map(int,input().split(" ")))
ans = 1
for i in range(a,b+1):
    ans *= i

if a>0:
    print("Positive")
elif a<0 and b>0:
    print("Zero")
elif a%2==0 and b%2==0 or a%2==1 and b%2==1:
    print("Negative")
else:
    print("Positive")

Submission status: Time Limit Exceeded

Solution code:
a,b = tuple(map(int,input().split(" ")))
ans = 1
for i in range(a,b+1):
    ans *= i

if ans>0:
    print("Positive")
elif ans==0:
    print("Zero")
else:
    print("Negative")

Submission status: Time Limit Exceeded

Solution code:
import sys

def main():
    l = input().split()
    a = int(l[0])
    b = int(l[1])

    temp = 1
    for i in range(a, b+1):
        temp *= i
    else:
        if temp == 0:
            print("Zero")
        elif temp > 0:
            print("Positive")
        else:
            print("Negative")


if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
import sys

def main():
    l = input().split()
    a = int(l[0])
    b = int(l[1])

    if a > b:
        print("plz let 'a' smaller than 'b'")
        quit()

    temp = 1
    for i in range(a, b+1):
        temp *= i
    else:
        if temp == 0:
            print("Zero")
        elif temp > 0:
            print("Positive")
        else:
            print("Negative")


if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import argparse
import numpy as np

parser = argparse.ArgumentParser(description='Range Product')
parser.add_argument('a', type=int)
parser.add_argument('b', type=int)
args = parser.parse_args()

a = args.a
b = args.b

if a > 0 and b > 0:
    print 'Positive'
elif a < 0 and b < 0:
    if (b - a) % 2 == 0:
        print 'Negative'
    else:
        print 'Positive'
else:
    print 'Zero'

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-

# スペース区切りの整数の入力
a, b = map(int, raw_input().split())
list1=[]
d=b-a
for i in xrange(d+1):
    list1.append(a+i)
s=1
for i in list1:
    s=s*i
if s<0:
    print "Negative"
elif s==0:
    print "Zero"
else:
    print "Positive"

Submission status: Time Limit Exceeded

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import argparse
import numpy as np

parser = argparse.ArgumentParser(description='Range Product')
parser.add_argument('a', type=int)
parser.add_argument('b', type=int)
args = parser.parse_args()

a = args.a
b = args.b

print a, b

if a > 0 and b > 0:
    print 'Positive'
elif a < 0 and b < 0:
    if (b - a) % 2 == 0:
        print 'Negative'
    else:
        print 'Positive'
else:
    print 'Zero'

Submission status: Time Limit Exceeded

Solution code:
a,b = map(int,input().split())

tmp = 1
for i in range(a,b+1):
    tmp = tmp * i
if(tmp == 0):
    print('Zero')
    exit()
if(tmp > 0):
    print('Positive')
    exit()
if(tmp < 0):
    print('Negative')
    exit()

Submission status: Time Limit Exceeded

Solution code:
b, c = map(int, input().split())
ans = 1
while b <= c:
	ans *= b
	b += 1

if ans > 0:
	print("Positive")
elif ans < 0:
	print("Negative")
else:
	print("Zero")

Submission status: Time Limit Exceeded

Solution code:
a, b = map(int,input().split())

f = [0] * 2
for i in range(a, b + 1):
    if i == 0:
        f[0] += 1
        break
    elif i < 0:
        f[1] += 1

if f[0] > 0:
    print("Zero")
elif f[1] % 2 == 1:
    print("Negative")
else:
    print("Positive")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a*b < 0: print("Zero")
elif b < 0 and (b-a)%2 == 0: print("Negative")
else: print("Positive")

Submission status: Accepted

Solution code:
a,b = [int(x) for x in input().split()]
if a > 0:
  print("Positive")
elif a < 0 and b > 0:
  print("Zero")
else:
  if (b - a + 1) % 2 == 1:
    print("Negative")
  else:
    print("Positive")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

if 0 < a <= b:
    print("Positive")
elif a <= b < 0:
    if (b - a + 1) % 2 == 0:
        print("Positive")
    else:
        print("Negative")
else:
    print("Zero")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if a > 0 and b > 0:
    print("Positive")
elif a < 0 and b > 0:
    print("Zero")
else:
    if (b - a + 1) % 2 == 0:
        print("Positive")
    else:
        print("Negative")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

if a == 0 or b == 0 or (a < 0 and 0 < b) or (0 < a and b < 0):
    print ("Zero")
else:
    x = b - a
    if 0 < a and 0 < b:
        print ("Positive")
    else:
        if x%2 == 0:
            print ("Negative")
        else:
            print ("Positive")

Submission status: Accepted

Solution code:
a,b = list(map(int, input().split()))
if a <= 0 <= b:
    print('Zero')
elif a <= b < 0 and (b-a) % 2 == 0:
    print('Negative')
else:
    print('Positive')

Submission status: Accepted

Solution code:
def main():
    a, b = map(int, input().split())
    num_neg = 0
    if a <= 0 and b >= 0:
        print('Zero')
        return
    elif a > 0:
        print('Positive')
        return
    else:
        num_neg = b - a
        if num_neg % 2 == 1:
            print('Positive')
            return
        else:
            print('Negative')
            return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a <= 0 <= b:
  print("Zero")
elif 0 < a:
  print("Positive")
else:
  if (b - a + 1) % 2 == 1:
    print("Negative")
  else:
    print("Positive")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
t = b-a+1
if a < 0 and b < 0:
    if t % 2 == 0:
        print('Positive')
    else:
        print('Negative')
elif a<0 and b>0 or a>0 and b<0:
    print('Zero')
else:
    print('Positive')

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
if A <= 0 and B >= 0:
  print('Zero')
elif A > 0 and B > 0:
  print('Positive')
else:
  if (B-A)%2 != 0:
    print('Positive')
  else:
    print('Negative')

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
if a > 0 and b > 0:
    print("Positive")
elif a <= 0 and b >= 0:
    print("Zero")
elif (b - a + 1) % 2 == 0:
    print("Positive")
else:
    print("Negative")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if a*b<=0:
    print("Zero")
elif b<0 and(b-a)%2==0:
    print("Negative")
else:
    print("Positive")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a <0 and b > 0:
    print('Zero')
    exit()
elif a>0 and b > 0:
    print('Positive')
    exit()
else:
    n = b-a+1
    if n%2 == 0:
        print('Positive')
    else:
        print('Negative')

Submission status: Accepted

Solution code:
a,b = map(int, input().split())

if a <= 0 <= b:
    print("Zero")
elif (a>0 and b>0) or (abs(b-a)%2==1):
    print("Positive")
else:
    print("Negative")

Submission status: Accepted

Solution code:
a,b= list(map(int,input().split()))
if a==0 or b==0:
    print("Zero")
elif a>0 and b>0:
    print("Positive")
elif a<0 and b>0:
    print("Zero")
else:
    c = abs(b-a)
    if c%2 == 0:
        print("Negative")
    else:
        print("Positive")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(a: int, b: int):
    if a <= 0 <= b:
        print("Zero")
        return
    if 0 < a:
        print("Positive")
        return
    if (abs(a-b)+1) % 2 == 1:
        print("Negative")
        return
    print("Positive")

    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  # type: int
    b = int(next(tokens))  # type: int
    solve(a, b)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if a <= 0 and b >= 0:
    print('Zero')
elif (b - a) % 2 == 0 and a < 0 and b < 0:
    print('Negative')
else:
    print('Positive')

Submission status: Accepted

Solution code:
a,b = map(int,input().split())


if a*b<=0:
  print("Zero")
elif (a>0 and b>0) or (a-b)%2 ==1:
  print("Positive")
else:
  print("Negative")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if a <= 0 and b >= 0:
    print('Zero')
if b < 0:
    if (b - a) % 2 == 0:
        print('Negative')
    else:
        print('Positive')
if a > 0:
    print('Positive')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if (0 < a):
  res = "Positive"

elif a <= 0 <= b:
  res = "Zero"

else:
  if a == b:
    res = "Positive"
  elif (b-a) % 2 == 1:
    res = "Positive"
  else:
    res = "Negative"
print(res)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if (0 < a):
  res = "Positive"

elif (a * b == 0) or (a * b < 0):
  res = "Zero"

else:
  if a == b:
    res = "Positive"
  elif (b-a) % 2 == 1:
    res = "Positive"
  else:
    res = "Negative"
print(res)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

if a<=0<=b:
    print('Zero')
else:
    if a<b<0 and (b-a+1)%2!=0:
        print('Negative')
    else:
        print('Positive')

Submission status: Accepted

Solution code:
# coding: utf-8

def main():
    a, b = map(int, input().split())
    ans = 'Positive'

    if a <= 0 and b >= 0:
        ans = 'Zero'
    elif b < 0:
        if (b - a) % 2 == 0:
            ans = 'Negative'

    print(ans)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a, b = [int(x) for x in input().split()]
if(a>0):
  print('Positive')
elif(a<=0 and b>=0):
  print('Zero')
else:
  delab = b-a+1
  if(delab%2==0):
    print('Positive')
  else:
    print('Negative')

Submission status: Accepted

Solution code:
a, b = map(int, input().split(' '))
result = 'Positive'
if a <= 0 <= b:
	result = 'Zero'
elif b < 0 and (b - a) % 2 == 0:
	result = 'Negative'
print(result)

Submission status: Accepted

Solution code:
#-*-coding:utf-8-*-
import sys
input=sys.stdin.readline

def main():
    a,b = map(int,input().split())
    if a == 0 or b ==0 or (a<0 and b>0):
        print("Zero")
        exit()
    else:
        if a > 0 and b > 0:
            print("Positive")
        elif abs(a-b)%2!=0:
            print("Positive")
        else:
            print("Negative")

if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
c = b - a
if a <= 0 <= b:
    print("Zero")
 
elif a > 0:
    print("Positive")
 
elif b < 0:
    if c % 2 == 1:
        print("Positive")
    else:
        print("Negative")

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
if a < 0 and b < 0:
  if (a - b) % 2 == 0:
    print('Negative')
  else:
    print('Positive')
if a < 0 and b >= 0:
  print('Zero')

if a == 0:
  print('Zero')

if a > 0:
  print('Positive')

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

if a <= 0 and b >= 0:
	print("Zero")
elif b < 0: 
	print("Positive") if (b - a + 1) % 2 == 0 else print("Negative")
else:
	print("Positive")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a < 0 and b < 0:
    if abs(b-a)%2 == 0: 
        print('Negative')
    else:
        print('Positive')
elif a <= 0 and b >=0:
    print('Zero')
else:
    print('Positive')

Submission status: Accepted

Solution code:
import sys
import copy
import math
import itertools
import numpy as np
l = [int(c) for c in input().split()]
a = l[0]
b = l[1]
if a*b <= 0:
    print("Zero")
elif a > 0 and b > 0:
    print("Positive")
else:
    if abs(b-a)%2==1:
        print("Positive")
    else:
        print("Negative")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

if a > 0:
  print("Positive")
  exit(0)
  
if (a == 0 or b == 0) or (a < 0 and b > 0):
  print("Zero")
  exit(0)
  
# only negative a,b cases left from this point on
if (a == b):
  print("Negative")
  exit(0)
  
if (a - b) % 2 == 1:
  print("Positive")
else:
  print("Negative")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a <= 0 <= b:
    print('Zero')
elif 0 < a:
    print('Positive')
else:
    if (b-a)%2:
        print('Positive')
    else:
        print('Negative')

Submission status: Accepted

Solution code:
# A
a,b =map(int,input().split())

if 0 < a and 0 < b:
  print("Positive")
elif (a == 0 or b == 0) or (a < 0 and 0 < b):
  print("Zero")
else:
  if (a-b)%2 == 0:
    print("Negative")
  else:
    print("Positive")

Submission status: Accepted

Solution code:
A = list(map(int, input().split()))
A.sort()
a = A[0]
b = A[1]
c = b-a

if a <= 0 <= b:
    print("Zero")

elif a > 0:
    print("Positive")

elif b < 0:
    if c%2 == 1:
        print("Positive")
    else:
        print("Negative")

Submission status: Accepted

Solution code:
a,b= map(int,input().split())

if a==0 or b==0:
    print("Zero")
    exit()

if a<=0 and 0<=b:
    print("Zero")
    exit()

if b<0:
    a=abs(a)
    b=abs(b)
    res = a-b
    if res%2==0:
        print("Negative")
    else:
        print("Positive")
else:
    print("Positive")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a <= 0 <= b:
  print("Zero")
elif a > 0:
  print("Positive")
else:
  if (b - a + 1) % 2 == 0:
    print("Positive")
  else:
    print("Negative")

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

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

if a > 0:
    print('Positive')
    sys.exit(0)
if a == 0:
    print('Zero')
    sys.exit(0)
if a < 0:
    if b >= 0:
        print('Zero')
        sys.exit(0)
    if b < 0:
        diff = (b - a) + 1
        if diff % 2 == 0:
            print('Positive')
        else:
            print('Negative')

Submission status: Accepted

Solution code:
def main():
    a, b = map(int, input().split())

    if a == 0 or b == 0:
        print("Zero")
    elif a <= b < 0:
        if (b - a + 1) % 2 == 0:
            print("Positive")
        else:
            print("Negative")
    elif a < 0 < b:
        print("Zero")
    elif 0 < a <= b:
        print("Positive")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def main():
    a, b = map(int, input().split())

    if a == 0 or b == 0:
        print("Zero")
    elif a < 0 and b < 0:
        if (b - a + 1) % 2 == 0:
            print("Positive")
        else:
            print("Negative")
    elif a < 0 and 0 < b:
        print("Zero")
    elif 0 < a and 0 < b:
        print("Positive")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
a,b = map(int, input().split())
if a <= 0 <= b:
    print("Zero")
    sys.exit()
elif b <0 and (b-a+1)%2 == 1:
    print("Negative")
    sys.exit()
else:
    print("Positive")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a>0:
    print("Positive")
elif a<=0 and b>=0:
    print("Zero")
else:
    if abs(a+b)%2==0:
        print("Negative")
    else:
        print("Positive")

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    a,b=MI()
    
    if a<=0<=b:
        print("Zero")
    
    elif a>0 and b>0:
        print("Positive")
    else:
        if b>0:
            b=-1
        n=(b-a+1)
        if n%2==0:
            print("Positive")
        else:
            print("Negative")

main()

Submission status: Accepted

Solution code:
# A - Range Product
a,b = map(int,input().split())
if a<=0 and b>=0:
    print('Zero')
elif (max(-a,0)-max(-b-1,0))%2==0:
    print('Positive')
else:
    print('Negative')

Submission status: Accepted

Solution code:
a, b = list(map(int, input().split()))

if a <= 0 and b >= 0:
  print("Zero")
  exit()

if a > 0:
  print("Positive")
  exit()

if (b - a + 1) % 2:
  print("Negative")
else:
  print("Positive")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

if a>0 and b>0:
    print('Positive')
elif a<0 and b>0 :
    print('Zero')
elif a<0 and b<0:
    if (b-a)%2==0:
        print('Negative')
    else:
        print('Positive')

Submission status: Accepted

Solution code:
a,b=map(int,input().split())

if a>0:
    print("Positive")
elif b<0:
    if (b-a+1)%2==0:
        print("Positive")
    else:
        print("Negative")
else:
    print("Zero")

Submission status: Accepted

Solution code:
a, b=map(int,input().split())
if (a < 0 and 0 < b) or (a == 0 or b ==0):
  print("Zero")
  exit()
elif 0 < a:
  print("Positive")
  exit()
if (b -a+1) % 2 == 0:
  print("Positive")
else:
  print("Negative")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a <= 0 and 0 <= b:
    print("Zero")
elif a <= 0:
    print("Positive" if (b-a)  %2 else "Negative")
else:
    print("Positive")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if a <= 0 and 0 <= b:
    print("Zero")
elif a < 0 and b < 0:
    if (abs(a)-abs(b)+1) % 2 == 1:
        print("Negative")
    else:
        print("Positive")
else:
    print("Positive")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if a > 0 and b > 0:
    print('Positive')
elif a <= 0 and b >= 0:
    print('Zero')
else:
    if abs(a - b) % 2 == 0:
        print('Negative')
    else:
        print('Positive')

Submission status: Accepted

Solution code:
a,b=map(int, input().split())

if 0<a and 0<b:
    print("Positive")
elif a<=0 and 0<=b:
    print("Zero")
elif (min(0,b)-a+1)%2==1:
    print("Negative")
else:
    print("Positive")

Submission status: Accepted

Solution code:
a, b=map(int, input().split())

if a<=0 and b>=0:
  print('Zero')
  
elif a>0:
  print('Positive')
  
elif b<0:
  if (b-a)%2!=0:
    print('Positive')
    
  else:
    print('Negative')

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a>0:
	print('Positive')
elif a*b<=0:
	print('Zero')
else:
	print('Negative' if (b-a+1)%2 else 'Positive')

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a<=0 and b>=0:
  print('Zero')
elif a>0:
  print('Positive')
elif a<0 and b>0:
  if abs(a)%2==0:
    print('Positive')
  else:
    print('Negative')
else:
  if (b-a)%2==0:
    print('Negative')
  else:
    print('Positive')

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

if a <= 0 and b >= 0:
    print('Zero')
    exit()

if a > 0 and b > 0:
    print('Positive')
    exit()

d = b - a
if d % 2 == 0:
    print('Negative')
else:
    print('Positive')

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a>0:
    print("Positive")
elif a<0 and b>0:
    print("Zero")
else:
    if a%2 ==b%2:
        print("Negative")
    else:
        print("Positive")

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
if 0 < a and 0 < b:
    print('Positive')
elif a <= 0 <= b:
    print('Zero')
else:
    if (b-a+1)%2 == 1:
        print('Negative')
    else:
        print('Positive')

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a*b<=0:
    print("Zero")
    exit()
if a>0:
    print("Positive")
else:
    if (b-a)%2==1:
        print("Positive")
    else:
        print("Negative")

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
if a<=0<=b:
    print("Zero")
elif a>0 and b>0 or b<0 and (a-b)%2==1:
    print("Positive")
else:
    print("Negative")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())

if (a>0 and b<0) or (a<0 and b>0):
  ans="Zero"
elif a==0 or b==0:
  ans="Zero"
elif a>0 and b>0:
  ans="Positive"
elif a<0 and b<0:
  if (a%2==0 and b%2==0) or (a%2!=0 and b%2!=0):
    ans="Negative"
  else:
    ans="Positive"
    
print(ans)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a > 0 and b > 0:
  print('Positive')
elif a < 0 and b < 0:
  if (b - a + 1) % 2 == 0:
        print('Positive')
  else:
        print('Negative')
elif a * b < 0:
        print('Zero')