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: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

# 「番号 n以下 の辺だけを貼ったときの連結成分の大きさが z 以上」を満たす最小のn
# 並列二分探索

N,M = map(int,readline().split())

def find_root(root,x):
    y = root[x]
    if x == y:
        return
    find_root(root,y)
    root[x] = root[y]

def merge(root,size,x,y):
    find_root(root,x)
    find_root(root,y)
    rx = root[x]
    ry = root[y]
    if rx == ry:
        return 0,0
    return (ry,rx) if size[rx] < size[ry] else (rx,ry)

def test(root,size,x,y,z):
    find_root(root,x)
    find_root(root,y)
    rx = root[x]
    ry = root[y]
    if rx == ry:
        return size[rx] >= z
    else:
        return size[rx] + size[ry] >= z

root = list(range(N+1))
size = [1] * (N+1)
merge_1 = [0] * (M+1)
merge_2 = [0] * (M+1)

for t in range(1,M+1):
    a,b = map(int,readline().split())
    x,y = merge(root,size,a,b)
    if x == 0:
        continue
    merge_1[t] = x
    merge_2[t] = y
    root[y] = x
    size[x] += size[y]
    
Q = int(readline())
X = []
Y = []
Z = []
for line in readlines():
    x,y,z = map(int,line.split())
    X.append(x)
    Y.append(y)
    Z.append(z)

left = [0] * Q # 連結成分は z 未満
right = [M] * Q # 連結成分は z 以上
q = tuple([] for _ in range(M+1))# 調べる時刻、番号
done = [False] * (M+1)
for i in range(Q):
    q[M//2].append(i)
rest = Q


while rest:
    root = list(range(N+1))
    size = [1] * (N+1)
    for t in range(1,M+1):
        x = merge_1[t]
        y = merge_2[t]
        if x != 0:
            root[y] = x
            size[x] += size[y]
        if done[t] or not q[t]:
            continue
        done[t] = True
        L = left[q[t][0]]
        R = right[q[t][0]]
        ML = (t+L)//2
        MR = (t+R)//2
        for i in q[t]:
            x = X[i]
            y = Y[i]
            z = Z[i]
            if test(root,size,x,y,z):
                right[i] = t
                mid = ML
            else:
                left[i] = t
                mid = MR
            if left[i] < mid:
                q[mid].append(i)
            else:
                rest -= 1

for x in right:
    print(x)

Submission status: Runtime Error

Solution code:
n,l=map(int,input().split())
r=list(map(int,input().split()))
last=0;tiepoint=0
for i in range(n-1):
  if r[i]+r[i+1]>last:
    last=r[i]+r[i+1]
    tiepoint=i
if last>=l:
  print("Possible")
  for i in range(n-1):
    if i==tiepoint:continue
    print(i+1)
  print(tiepoint+1)
else:print("Impossible")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    n, m = list(map(int, input().rstrip('\n').split()))
    lr = [list(map(int, input().rstrip('\n').split())) for _ in range(m)]
    a = [0] * (n + 2)
    for l, r in lr:
        a[l] += 1
        a[r + 1] -= 1
    t = 0
    cnt = 0
    for i in range(1, n + 1):
        t += a[i]
        if t == m:
            cnt += 1
    print(cnt)


if __name__ == '__main__':
    slove()

Submission status: Runtime Error

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

Submission status: Runtime Error

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:
    if (b - a + 1) % 2:
        print('Negative')
    else:
        print('Positive')

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import logging

logging.basicConfig(level=logging.INFO, format="%(message)s")
#logging.disable(logging.CRITICAL)

def main():
    a, b = map(int, input().split())
    logging.info("Hello!")

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

    
    
if __name__ == "__main__":
    main()

Submission status: Runtime Error

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 and abs(0-a) % 2 == 0:
  print("Positive")
elif a < 0 and b < 0 and abs(0-a) % 2 == 0::
  print("Positive")
else:
  print("Negative")

Submission status: Runtime Error

Solution code:
a = input()
b = input()
a=int(a)
b=int(b)
if a>0:
    print("positive")
elif a ==0 or b==0:
   print(0)
elif a  <0 and b>0:
    print(0)
elif (b-a)%2==0:
    print('negative')
else:
    print("positibe")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b = map(int, input().split())
if a*b > 0:
  print("Positive")
else:
  if any(a,b) > 0:
    print("Zero")
  else:
    print("Negative")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include<stdio.h>

int main(){

  int a,b,mul,i;

  scanf("%d %d",&a,&b);
  mul = 1;
  for(i=0;i<b-a+1;i++){
    mul = mul*(a+i);
  }

  if(mul==0)
    printf("Zero");
  else if(mul>0)
    printf("Positive");
  else
    printf("Negative");
  return 0;

}

Submission status: Runtime Error

Solution code:
#include<stdio.h>

int main(){
  int a,b,c;
  char s[101];
  
  scanf("%d",&a);
  scanf("%d %d",&b,&c);
  
  scanf("%s",&s);
  
  printf("%d %s",a+b+c,s);
  return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b=int(input().split())
if a*b==0:
  print('Zero')
if a*b<0:
  print('Negative')
if a*b>0:
  print('Positive')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

ans = 1
for i in range(len(l)):
    ans *= l[i]

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

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
l = list(range(a,b+1))
ans = 1
for i in range(len(l)):
    ans *= l[i]

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef vector<vvll> vvvll;
typedef vector<string> vstr;
typedef pair<ll, ll> pll;
typedef vector<pll> vp;
typedef map<ll, ll> mll;
typedef map<string, ll> mstrll;
#define pb push_back
#define mp make_pair
#define fir first
#define sec second
#define maxs(x, y) (x = max(x, y))
#define mins(x, y) (x = min(x, y))
#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for(ll i = ll(a); i < ll(b); i++)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep,)(__VA_ARGS__)
#define each(i, n) for(auto&& i: n)
#define out(x) cout << (x)
#define indent() cout << '\n'
#define print(x) cout << (x) << '\n'
#define debug(x) cerr << #x << ": " << (x) << '\n'
ll gcd(ll a, ll b){return b != 0 ? gcd(b, a % b) : a;}
ll lcm(ll a, ll b){return a / gcd(a, b) * b;}
ll factorial(ll a){return a < 2 ? 1 : factorial(a - 1) * a;}
ll summation(ll a){return a < 1 ? 0 : (a * a + a) / 2;}
const ll INF = 1e16;
const ll MOD = 1e9 + 7;
const string ALPHABETS = "abcdefghijklmnopqrstuvwxyz";
ll dx[] = {-1, 0, 1, 0}, dy[] = {0, -1, 0, 1};
//ll dx[] = {-1, 0, 1, -1, 1, -1, 0, 1}, dy[] = {-1, -1, -1, 0, 0, 1, 1, 1};
ll n, m, x, y, z, w, h;
string s, t;

signed main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    while(cin >> n >> m){
        ll ans = 0, tmp = 0, cnt = 0, mx = -INF, mn = INF;
        ll a[] = {}, b[] = {}, c[] = {};
        vll v;
        if(n * m <= 0){
            print("Zero");
        }else{
            if(n < 0){
                print(abs(n - m) % 2 ? "Positive" : "Negative");
            }else{
                print("Positive");
            }
        }
    }
}

Submission status: Runtime Error

Solution code:
G, B = map(int,input().split())

if G>0 and B>0:
    print('Positive')

elif G<=0 and B>=0:
    print('Zero')

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

Submission status: Runtime Error

Solution code:
G, B = map(int,input().split())

if G*B <= 0:
  print('Zero')

elif G > 0:
  print('Positive')

elif (b - a) % 2 == 0:
  print('Negative')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, k = map(int, raw_input().split())
l = map(int, raw_input().split())
totallen = sum(l)
h = []
i = 0
j = n - 2
ans = []
while i <= j:
	if totallen < k:
		break
	else:
		if l[i] < l[j]:
			ans.append(i + 1)
			totallen -= l[i]
			i += 1
		else:
			ans.append(j + 1)
			totallen -= l[j+1]
			j -= 1
if len(ans) == n - 1:
	print "Possible"
	for i in ans:
		print i 
else:
	print "Impossible"

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
l=range(a,b+1)
ans=1
for i in rang(len(l)):
  ans=ans*l[i]
print(ans)

Submission status: Runtime Error

Solution code:
a,b = str(int,input().split())#整数を文字列として入力
S = a+b
P = S.count("-")
if P == 1:
  print("0")
elif P == 2:
  print("Negative")
else:
  print("Positive")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
a, b = map(int, raw_input().split())
if a * b < 0:
    print 'Zero'
elif n + m < 0 and abs(a - b) & 1 == 0:
    print 'Negative'
else:
    print 'Positive'

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def main():
  t = input().split(" ")
  A = int(t[0])
  B = int(t[1])
  
  if B < 0:
    if (B - A) % 2 == 1
    	print("Positive")
    else :
    	print("Negative")
  elif 0 < A:
    print("Positive")
  else:
    print("Zero")
    
main()

Submission status: Runtime Error

Solution code:
def main():
  t = input().split(" ")
  A = int(t[0])
  B = int(t[1])
  
  if b < 0:
    print("Negative")
  elif 0 < a:
    print("Positive")
  else:
    print("Zero")
    
main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,M = map(int,input().split())
a = []
for i in range(M):
    a.append(input())

b = [0 for i in range(N)]
b[0] = 1
c = [1 for i in range(N)]
for d in a:
    fr,to = map(int,d.split())
    fr -=1
    to -=1
    c[fr ] -= 1
    c[to ] += 1
    if b[fr] > 0:
        b[to] = 1
        b[fr] = 1 if c[fr] > 0 else 0

ans = b.count(1)
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,m = [int(x) for x in input().split(' ')]
prob = [1] + [0 for x in range(n-1)]
ball = [1 for x in range(n)]
for i in range(m):
    x,y = [int(x) for x in input().split(' ')]
    ball[x-1] -= 1
    ball[y-1] += 1
    if prob[x-1] == 1:
        prob[y-1] = 1
    if ball[x-1] == 0:
        prob[x-1] = 0

print(sum(prob))

Submission status: Runtime Error

Solution code:
n,m = map(int, raw_input().split())
rl = [0.0 for _ in range(n)]
wl = [1.0 for _ in range(n)]
rl[0] = 1.0
wl[0] = 0.0
for _ in range(m):
    x,y = map(int, raw_input().split())
    p = rl[x-1] + wl[x-1]
    rl[y-1] += rl[x-1] / p
    wl[y-1] += wl[x-1] / p
    rl[x-1] -= rl[x-1] / p
    wl[x-1] -= wl[x-1] / p
cnt = 0
for p in rl:
    if p != 0:
        cnt += 1
print cnt

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

sys.setrecursionlimit(10**7)
inf = 10**10
mod = 10**9 + 7


def f():
    a,b = list(map(int, input().split()))
    if a * b == 0 or (a < 0 && b > 0):
        return 'Zero'
    if b < 0 and (a+b) % 2 == 0:
        return 'Negative'
    return 'Positive'

print(f())

Submission status: Runtime Error

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

sys.setrecursionlimit(10**7)
inf = 10**10
mod = 10**9 + 7


def f():
    a,b = list(map(int, input().split()))
    if a * b == 0 or (a < 0 && b > 0):
        return 'Zero'
    if b < 0 and (a+b) % 2 == 0
        return 'Negative'
    return 'Positive'

print(f())

Submission status: Runtime Error

Solution code:
a,b = map(int, raw_input().split())
c = 1
for i in range(a,b+1):
	c = c * i 

if c < 0:
	print "Negative"
elif c == 0:
	print "Zero"
else:
	print "Positive"

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=input()
b=input()
p=1
for i in range(a, b):
   p=p*i
if i>0:
 print 'Positive'
elif i<0:
  print 'Negative'
else:
  print 'Zero'

Submission status: Runtime Error

Solution code:
n, l = (int(s) for s in input().strip().split(' '))
an = []
for a in range(0,l):
    an.append(input().strip().split())
box=[[1,0] for i in range(n)]
box[0][1] = 1
for move in an:
    box[int(move[0])-1][0] -= 1
    box[int(move[1])-1][0]+=1
    if box[int(move[0])-1][1] == 1:
        box[int(move[1])-1][1]= 1
    if box[int(move[0])-1][0]==0:
        box[int(move[0])-1][1]=0
print(str(sum([s[1] for s in box])))

Submission status: Runtime Error

Solution code:
    n, l = (int(s) for s in input().strip().split(' '))
    an = []
    for a in range(0,l):
        an.append(input().strip().split())

    box=[[1,0] for i in range(n)]
    box[0][1] = 1
    for move in an:
        box[int(move[0])-1][0] -= 1
        box[int(move[1])-1][0]+=1
        if box[int(move[0])-1][1] == 1:
            box[int(move[1])-1][1]= 1
        if box[int(move[0])-1][0]==0:
            box[int(move[0])-1][1]=0
    print(str(sum([s[1] for s in box])))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# coding: utf-8

from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
import math
import string
import itertools
import fractions
import heapq
import collections
import re
import array
import bisect

def eat_all(al):
    for i in range(len(al)):
        al[i] -= 1
    while True:
        if al[0] == 0:
            al.pop(0)
        else:
            break
    return al

def step(turn, a_list):
    if len(a_list) == 1:
        if a_list[0] % 2 == 0:
            return turn
        else:
            return (not turn)
    if a_list[-1] % 2 != 0:
        a_list.pop()
        return step(not turn, a_list)
    else:
        a_list = eat_all(a_list)
        a_list.pop()
        if len(a_list) == 0:
            return turn
        return step(turn, a_list)

n = int(input())
a_list = [None] * n
inputs = input().split(" ")
for i in range(n):
    a_list[i] = int(inputs[i])
a_list.sort()
win = step(1, a_list)
if win == 1:
    print("First")
else:
    print("Second")

Submission status: Runtime Error

Solution code:
# coding: utf-8

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

ans = 1

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

if ans > 0:
  print "Positive"

elif ans == 0:
  print "Zero" #Fate/Zeroは神アニメ

else:
  print "Negative"

Submission status: Runtime Error

Solution code:
n,m = map(int,raw_input().split())
arr = [1]*n
x = [False]*n
x[0] = True
counter = 0
for i in xrange(m) :
    a,b = map(int,raw_input().split())
    if x[a-1] :
        x[b-1] = True
    arr[a-1] -= 1
    arr[b-1] += 1
    if arr[a-1] == 0 :
        x[a-1] = False
for j in x :
    if j  :
        counter += 1
print counter

Submission status: Runtime Error

Solution code:
n, l = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
dp = [[None] * n for _ in range(n)]

Aacc = [A[0]]
for i in range(1, n):
    Aacc.append(Aacc[i - 1] + A[i])

def length(a, b):
    return Aacc[b] - (Aacc[a - 1] if a > 0 else 0)

def search(a, b):
    if dp[a][b] is None:
        if a == b:
            ans = []
        elif length(a, b) >= l:
            for cut in range(a, b):
                left = search(a, cut)
                if left is not False:
                    right = search(cut + 1, b)
                    if right is not False:
                        ans = [cut] + left + right
                        break
            else:
                ans = False
        else:
            ans = False

        dp[a][b] = ans

    return dp[a][b]

ans = search(0, n - 1)
if ans is False:
    print('Impossible')
else:
    print('Possible')
    for a in ans:
        print(a + 1)

Submission status: Runtime Error

Solution code:
a, b = map(int, raw_input().split(" "))
def f(arr):
    return reduce(lambda x, y: x*y, arr)

if a == b:
    if a < 0:
        print "Negative"
    elif a == 0:
        print "Zero"
    else:
        print "Positive"
elif a == 0 or b == 0:
    print "Zero"
elif a <= 0 and b > 0:
    print "Zero"
elif f(range(a,b+1)) < 0:
    print "Negative"
else:
    print "Positive"

Submission status: Runtime Error

Solution code:
import sys

def main():
    a = int(sys.argv[1])
    b = int(sys.argv[2])

    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: Runtime Error

Solution code:
ab=raw_input().split()
a=int(ab[0])
b=int(ab[1])
num=1
if a <=0 and b>=0:
    print 'Zero'
else:
    for val in range(a,b+1,1):
        num*=val
    if num > 0:
        print 'Positive'
    elif num==0:
        print 'Zero'
    else :
        print'Negative'

Submission status: Runtime Error

Solution code:
import sys

def main():
    a = int(sys.argv[1])
    b = int(sys.argv[2])

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

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


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
ab=raw_input().split()
a=int(ab[0])
b=int(ab[1])
num=1
for val in range(a,b+1,1):
    num*=val

if num > 0:
    print 'Positive'
elif num==0:
    print 'Zero'
else :
    print'Negative'

Submission status: Runtime Error

Solution code:
a, b = map(int, raw_input().split(" "))
def f(arr):
    return reduce(lambda x, y: x*y, arr)

if a == 0 or b == 0:
    print "Zero"
elif f(range(a, b+1)) == 0:
    print "Zero"
elif f(range(a,b+1)) < 0:
    print "Negative"
else:
    print "Positive"

Submission status: Runtime Error

Solution code:
a,b = [int(i) for i in input().split() ]
multi_sum = reduce(lambda x,y:x*y,[ for i in range(a,b) ])
if multi_sum > 0:
    print("Positive")
elif multi_sum < 0:
    print("Negative")
else:
    print("Zero")

Submission status: Runtime Error

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

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

    if total > 0:
        print 'Positive'
    elif total < 0:
        print 'Negative'
    else:
        print 'Zero'
    
        
if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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