s_id
stringlengths
10
10
p_id
stringlengths
6
6
u_id
stringlengths
10
10
date
stringlengths
10
10
language
stringclasses
1 value
original_language
stringclasses
11 values
filename_ext
stringclasses
1 value
status
stringclasses
1 value
cpu_time
int64
0
100
memory
stringlengths
4
6
code_size
int64
15
14.7k
code
stringlengths
15
14.7k
problem_id
stringlengths
6
6
problem_description
stringlengths
358
9.83k
input
stringlengths
2
4.87k
output
stringclasses
807 values
__index_level_0__
int64
1.1k
1.22M
s933916285
p04033
u254456372
1506112784
Python
Python (3.4.3)
py
Accepted
17
3060
410
#!/usr/bin/env python3 # -*- coding: utf-8 -*- def main(): A, B = map(int, input().split()) if 0 < A: sign = 1 elif A <= 0 <= B: sign = 0 else: # B < 0 even = (B-A+1) % 2 == 0 sign = 1 if even else -1 if sign > 0: print("Positive") elif sign == 0: ...
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,117
s021670102
p04033
u596276291
1505496890
Python
Python (3.4.3)
py
Accepted
21
3316
527
from collections import defaultdict, Counter from itertools import product, groupby, count, permutations, combinations from math import pi, sqrt from collections import deque from bisect import bisect, bisect_left, bisect_right INF = 10 ** 10 def main(): a, b = map(int, input().split()) if a <= 0 <= b: ...
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,118
s511823030
p04033
u207056619
1502332514
Python
Python (3.4.3)
py
Accepted
17
2940
192
#!/usr/bin/env python3 a, b = map(int,input().split()) if a <= b < 0: ans = (b - a) % 2 and 'Positive' or 'Negative' elif 0 < a <= b: ans = 'Positive' else: ans = 'Zero' print(ans)
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,119
s612874128
p04033
u830580569
1502317027
Python
Python (2.7.6)
py
Accepted
11
2568
282
def range_product(): a, b = map(int, raw_input().split(" ")) if a>0: print "Positive" elif a==0: print "Zero" else: if b>=0: print "Zero" else: l = b-a+1 if l%2==0: print "Positive" else: print "Negative" if __name__ == "__main__": range_product()
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,120
s686629080
p04033
u835482198
1500886933
Python
Python (3.4.3)
py
Accepted
17
2940
252
a, b = map(int, input().split()) if a <= 0 <= b: print("Zero") elif a <= b < 0: if a == b: print("Negative") elif (abs(a) - abs(b)) % 2 == 1: print("Positive") else: print("Negative") else: print("Positive")
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,121
s130197389
p04033
u089230684
1500709172
Python
Python (3.4.3)
py
Accepted
17
3060
351
from sys import stdin def main(): a,b = [int(x) for x in stdin.readline().strip().split()] if b>=0 and a<=0: print('Zero') elif b>0 and a>0: print("Positive") else: a = abs(a) b = abs(b) if ((b-a)+1)%2==0: print("Positive") else: ...
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,122
s815720263
p04033
u089230684
1500708785
Python
Python (3.4.3)
py
Accepted
17
3060
316
from sys import stdin def main(): a,b = [int(x) for x in stdin.readline().strip().split()] if a == 0 or b == 0 or ( a < 0 and b > 0): print("Zero") elif a > 0 and b > 0 or (a == b): print("Positive") else: val = abs(abs(b)-abs(a)) if val%2 == 0 : print("Negative") else: print("Positive") main()
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,123
s461794548
p04033
u846552659
1497568339
Python
Python (3.4.3)
py
Accepted
17
3060
241
# -*- coding:utf-8 -*- a, b = map(int, input().split()) if a <= 0 and b >= 0: print('Zero') elif a > 0 and b > 0: print('Positive') else: if a == b or abs(b-a)%2 != 0: print('Positive') else: print('Negative')
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,124
s130225282
p04033
u942697937
1492233120
Python
Python (2.7.6)
py
Accepted
10
2568
197
a, b = map(int, raw_input().split()) if 0 < a: print "Positive" elif 0 == a: print "Zero" elif 0 <= b: print "Zero" elif (b-a) % 2 == 1: print "Positive" else: print "Negative"
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,125
s091939592
p04033
u026450699
1491497946
Python
Python (2.7.6)
py
Accepted
10
2568
181
a, b = map(int, raw_input().strip().split()) if (a > 0): print "Positive" elif (b > 0): print "Zero" elif (b - a) % 2 != 0: print "Positive" else: print "Negative"
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,126
s090421781
p04033
u058240079
1491497618
Python
Python (2.7.6)
py
Accepted
10
2568
164
a,b = map(int, raw_input().split()) if a <= 0 and b >= 0: print 'Zero' elif a < 0 and b < 0 and (b-a) % 2 == 0: print 'Negative' else: print 'Positive'
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,127
s940808706
p04033
u692632484
1488516476
Python
Python (3.4.3)
py
Accepted
17
3060
145
ab=input().split() a=int(ab[0]) b=int(ab[1]) if a<=0 and b>=0: print("Zero") elif a>0 or (b-a)%2==1: print("Positive") else: print("Negative")
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,128
s923858627
p04033
u622011073
1487540102
Python
Python (3.4.3)
py
Accepted
19
2940
124
a,b=map(int,input().split()) if a<=0<=b:c='Zero' elif 0<a<=b or abs(abs(a)-abs(b))&1:c='Positive' else:c='Negative' print(c)
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,129
s567073236
p04033
u622011073
1487539935
Python
Python (3.4.3)
py
Accepted
17
2940
143
a,b=map(int,input().split()) if a<=0<=b:c='Zero' elif 0<a<=b:c='Positive' elif not abs(abs(a)-abs(b))&1:c='Negative' else:c='Positive' print(c)
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,130
s725919566
p04033
u227486042
1487085096
Python
Python (3.4.3)
py
Accepted
24
3064
662
# input including new line and return list of int def get_include_new_line_input(): pass N = int(input()) a = [] for x in range(N): a.append(int(input())) return a # input splitted by space and return list of int def get_spilitted_space_input(): a = list(map(lambda x:int(x), input().split())) return a # inp...
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,131
s742732359
p04033
u043805613
1486096563
Python
Python (2.7.6)
py
Accepted
17
2568
219
a,b = map(int,raw_input().split()) if((a<0 and b>0) or a==0 or b==0): print("Zero") elif(a>0): print("Positive") else: if((((a-b)*-1)+1)%2==1): print("Negative") else: print("Positive")
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,132
s772347979
p04033
u327543932
1485971196
Python
Python (2.7.6)
py
Accepted
17
2568
192
a,b=map(int,raw_input().split()) if 0<a: print ('Positive') elif a<=0<=b: print ('Zero') else: c=b-a if c%2==0: print ('Negative') else: print ('Positive')
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,133
s035712191
p04033
u834311314
1484714157
Python
Python (3.4.3)
py
Accepted
23
3064
147
a,b = map(int, input().split()) if a * b <= 0: print("Zero") elif a < 0 and (b - a) % 2 == 0: print("Negative") else: print("Positive")
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,134
s147730180
p04033
u834311314
1484713805
Python
Python (3.4.3)
py
Accepted
23
3064
178
a,b = map(int, input().split()) if a <= 0 and 0 <= b: print("Zero") elif a > 0: print("Positive") elif (a + b) % 2 == 0: print("Negative") else: print("Positive")
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,135
s030302244
p04033
u095015466
1481219018
Python
Python (2.7.6)
py
Accepted
17
2568
156
a,b=map(int,raw_input().split()) if 0<a: print 'Positive' elif b<0: if (min(0,b)-a)%2==0: print 'Negative' else: print 'Positive' else: print 'Zero'
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,136
s525901295
p04033
u132291455
1478097224
Python
PyPy2 (5.6.0)
py
Accepted
41
9072
139
a,b=map(int,raw_input().split()) if a>0 and b>0:print 'Positive' elif a*b>0:print 'Positive' if (a-b)%2 else 'Negative' else: print 'Zero'
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,137
s903492703
p04033
u637175065
1474570718
Python
Python (3.4.3)
py
Accepted
89
5420
356
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 and b > 0): return 'Zero' if b < 0 and (a+b) % 2 == 0: return 'Negative...
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,138
s059314331
p04033
u284188208
1474304601
Python
Python (2.7.6)
py
Accepted
25
2568
176
a,b = map(int, raw_input().split()) if a < 0 and b < 0: if (b - a)%2 == 1: print "Positive" else: print "Negative" elif a * b <= 0: print "Zero" else: print "Positive"
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,139
s421428426
p04033
u886545507
1472242324
Python
Python (2.7.6)
py
Accepted
27
2568
174
#AGC002A a,b=map(int,raw_input().split()) if a<=0 and b>=0: print "Zero" elif a>0: print "Positive" elif b<0: if (b-a)%2==0: print "Negative" else: print "Positive"
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,140
s989746806
p04033
u226155577
1471381869
Python
Python (2.7.6)
py
Accepted
29
2568
149
a, b = map(int, raw_input().split()) if a <= 0 <= b: print "Zero" elif b < 0 and (b-a) % 2 == 0: print "Negative" else: print "Positive"
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,141
s169059322
p04033
u790998395
1470860150
Python
Python (3.4.3)
py
Accepted
39
3064
215
a, b = map(int, input().split(" ")) if (a < 0 and b < 0): if (a - b) % 2 == 0: print("Negative") else: print("Positive") elif (a < 0 and b > 0): print("Zero") else: print("Positive")
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,142
s323680652
p04033
u423289347
1470537663
Python
Python (3.4.3)
py
Accepted
42
3064
215
import math a,b = tuple(map(int,input().split(" "))) 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")
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,143
s283411781
p04033
u551313534
1470450206
Python
Python (3.4.3)
py
Accepted
40
3188
170
a, b = (int(s) for s in input().strip().split(' ')) if a <= 0 and 0 <= b: print('Zero') elif 0 < a or (b-a)%2 == 1: print('Positive') else: print('Negative')
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,144
s171681990
p04033
u357487020
1470426653
Python
Python (2.7.6)
py
Accepted
28
2568
179
a,b=map(int,raw_input().split()) if a>0: print("Positive") elif b<0: if (b-a+1)%2==0: print('Positive') else: print("Negative") else: print("Zero")
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,145
s193839008
p04033
u825624694
1470343829
Python
Python (3.4.3)
py
Accepted
38
3064
134
a,b = map(int,input().split()) if a*b<=0: print("Zero") elif a<0 and (b-a)%2==0: print("Negative") else: print("Positive")
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,146
s894937123
p04033
u713368238
1470252592
Python
Python (3.4.3)
py
Accepted
43
3064
180
a, b = map(int, input().split()) if a > 0: print('Positive') elif a <= 0 and b >= 0: print('Zero') elif abs(a+b) % 2 == 0: print('Negative') else: print('Positive')
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,147
s953102877
p04033
u608854150
1470199917
Python
Python (3.4.3)
py
Accepted
40
3064
184
a, b = map(int, input().split()) if a <= 0 and b >= 0: ans = "Zero" elif a > 0: ans = "Positive" elif b < 0: if (b-a)%2 == 1: ans = "Positive" else: ans = "Negative" print(ans)
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,148
s830873976
p04033
u707500405
1470193573
Python
Python (2.7.6)
py
Accepted
30
2568
150
a,b = map(int,raw_input().split()) if a <= 0 <= b: print "Zero" elif a > 0: print "Positive" else: print "Positive" if (b - a) % 2 else "Negative"
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,149
s737047978
p04033
u382423941
1470160460
Python
Python (3.4.3)
py
Accepted
37
3064
189
a, b = map(int, input().split()) if a > 0: print('Positive') elif b >= 0: print('Zero') else: num_negative = abs(a-b)+1 print('Negative' if(num_negative&1) else 'Positive')
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,150
s709175708
p04033
u821262411
1470139111
Python
Python (3.4.3)
py
Accepted
42
3064
145
a,b=map(int,input().split()) if a<0 and b>0: print('Zero') elif a<0 and b<0 and (b-a)%2==0: print('Negative') else: print('Positive')
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,151
s245291699
p04033
u125680071
1470095872
Python
Python (3.4.3)
py
Accepted
40
3064
261
a, b = map(int, input().split()) def solve(a, b): if (a < 0 and b > 0) or a == 0 or b == 0: return 'Zero' if a > 0: return 'Positive' if (b - a) % 2: return 'Positive' else: return 'Negative' print(solve(a, b))
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,152
s585725136
p04033
u352021237
1470094492
Python
Python (2.7.6)
py
Accepted
27
2568
274
a,b=map(int,raw_input().split()) count=b-a+1 if a<0: if a+count-1>=0: print "Zero" else: if count%2==0: print "Positive" else: print "Negative" else: if a==0: print "Zero" else: print "Positive"
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,153
s171262941
p04033
u591287669
1470069382
Python
Python (3.4.3)
py
Accepted
37
3064
164
a,b=map(int,input().split()) if a>0: print("Positive") elif a<=0 and b>=0: print("Zero") elif (b-a)%2!=0: print("Positive") else: print("Negative")
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,154
s617519803
p04033
u830390742
1470059481
Python
Python (2.7.6)
py
Accepted
27
2568
160
a, b = map(int, raw_input().split()) if a > 0: print 'Positive' elif b >= 0: print 'Zero' elif (b-a)%2: print 'Positive' else: print 'Negative'
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,155
s432518566
p04033
u299869545
1470056163
Python
Python (2.7.6)
py
Accepted
27
2568
144
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'
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,156
s571623058
p04033
u414809621
1470024595
Python
Python (3.4.3)
py
Accepted
43
3064
352
# -*- coding: utf-8 -*- """ Created on Mon Aug 1 00:00:01 2016 @author: dotha """ def h(a): if a[0]*a[1] <= 0: return 'Zero' elif a[0] < 0: if (a[1]-a[0])%2 == 0: return 'Negative' else: return 'Positive' else: return 'Positive' print(h(lis...
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,157
s060641796
p04033
u813098295
1470018085
Python
Python (2.7.6)
py
Accepted
26
2568
220
# coding: utf-8 a, b = map(int, raw_input().split()) if a > 0: print "Positive" elif b >= 0: print "Zero" #Fate/Zeroは神アニメ else: if (b - a) % 2 == 0: print "Negative" else: print "Positive"
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,158
s805297447
p04033
u461954362
1470016773
Python
Python (3.4.3)
py
Accepted
39
3064
391
#!/usr/bin/env python # -*- coding:utf-8 -*- from __future__ import division, print_function, absolute_import, unicode_literals def main(): a, b = map(int, input().split()) if a <= 0 <= b: print("Zero") elif 0 < a: print("Positive") elif (a - b) % 2 == 0: print("Negative") ...
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,159
s084826978
p04033
u945094648
1470016559
Python
Python (2.7.6)
py
Accepted
27
2568
277
a,b = map(int,raw_input().split()) if a<0 and b>0 or a==0 or b==0: print "Zero" elif a>0 and b>0: print "Positive" elif a<0 and b<0 and a%2==0 and b%2==0: print "Negative" elif a%2!=0 and b%2!=0: print "Negative" elif a%2!=0 or a%2==0 and b%2!=0 or b%2==0: print"Positive"
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,160
s801556001
p04033
u531542790
1470016270
Python
Python (3.4.3)
py
Accepted
38
3188
333
import sys def main(): l = input().split() a = int(l[0]) b = int(l[1]) 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") if __name__ == '__main__'...
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,161
s614857404
p04033
u161703388
1470016107
Python
Python (3.4.3)
py
Accepted
41
3064
469
def IsZero(a, b): if a == 0 or b == 0: return True elif a < 0 and b > 0: return True else: return False def IsPositive(a, b): if a > 0: # and b > 0 return True else: if (b - a + 1) % 2 == 0: return True else: return False a...
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,162
s492525370
p04033
u277373937
1470015335
Python
Python (2.7.6)
py
Accepted
25
2568
233
input = raw_input() a, b = input.split() a = int(a) b = int(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'
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,163
s079639171
p04033
u657357805
1470015033
Python
Python (3.4.3)
py
Accepted
42
3064
224
import sys a,b=[int(x) for x in input().split()] reverse=0 if(a<=0 and b>=0): print("Zero") sys.exit() if(a>0): print("Positive") sys.exit() if(b-a)%2: print("Positive") sys.exit() print("Negative")
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,164
s325984545
p04033
u409753607
1470014934
Python
Python (2.7.6)
py
Accepted
27
2568
328
# -*- coding: utf-8 -*- # スペース区切りの整数の入力 a, b = map(int, raw_input().split()) dnum=b-a+1 if b<0: odd=0 if dnum%2==1: odd=1 if odd==0: print "Positive" else: print "Negative" if a*b==0: print "Zero" if b>0 and a<0: print "Zero" if a>0: print "Positive"
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,165
s007173156
p04033
u749127958
1470014784
Python
Python (2.7.6)
py
Accepted
30
2692
185
ab=raw_input().split() a=int(ab[0]) b=int(ab[1]) num=1 if a <=0 and b>=0: print 'Zero' elif a>0: print 'Positive' elif (b-a)%2==0: print 'Negative' else: print'Positive'
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,166
s017583232
p04033
u966695411
1470014420
Python
Python (3.4.3)
py
Accepted
48
3188
204
#! /usr/bin/env python3 A, B = map(int, input().split()) if A < 0: if B < 0: print('Positive' if (abs(A)-abs(B))%2 else 'Negative') else: print('Zero') else: print('Positive')
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,167
s313799360
p04033
u107077660
1470014269
Python
Python (3.4.3)
py
Accepted
38
3064
166
a, b = map(int, input().split()) if a*b <= 0: print("Zero") elif a < 0: if (a - b) % 2 == 0: print("Negative") else: print("Positive") else: print("Positive")
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,168
s747021838
p04033
u941268675
1470014217
Python
Python (2.7.6)
py
Accepted
25
2568
243
a, b = map(int, raw_input().split()) if a < 0 < b or a == 0 or b == 0: print "Zero" else: if a > 0: print "Positive" else: if (a - b) % 2 == 0: print "Negative" else: print "Positive"
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,169
s518361960
p04033
u817026203
1470014192
Python
Python (2.7.6)
py
Accepted
27
2568
170
a, b = map(int, raw_input().split()) m = 0 if a >= 0 else (min(b, -1) - a + 1) if a <= 0 <= b: print 'Zero' elif m % 2 == 0: print 'Positive' else: print 'Negative'
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,170
s600071895
p04033
u300538442
1470014181
Python
Python (3.4.3)
py
Accepted
38
3188
193
# encoding: utf-8 a,b = map(int, input().split()) if(a<=0 and b>=0): print("Zero") elif(a > 0): print("Positive") elif((b - a)%2 == 0): print("Negative") else: print("Positive")
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,171
s405707971
p04033
u801744474
1470014082
Python
Python (3.4.3)
py
Accepted
39
3064
160
a, b = map(int,input().split()) if a <= 0 and b >= 0: print("Zero") elif a > 0 or not ((b - a + 1) & 1) : print("Positive") else: print("Negative")
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,172
s107226750
p04033
u127291346
1470013961
Python
Python (3.4.3)
py
Accepted
37
3064
180
# -*- coding: utf-8 -*- a, b = map(int, input().split()) if a <= 0 <= b: print("Zero") elif a < 0 and (b - a + 1) % 2 == 1: print("Negative") else: print("Positive")
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,173
s021838843
p04033
u145496715
1470013957
Python
PyPy2 (5.6.0)
py
Accepted
67
8816
208
a, b = map(int, raw_input().split()) if a <= 0 and b >= 0: print('Zero') elif a > 0: print('Positive') else: if (-a + b + 1) % 2 == 0: print('Positive') else: print('Negative')
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,174
s261921549
p04033
u039623862
1470013957
Python
Python (3.4.3)
py
Accepted
37
3188
192
a,b=map(int, input().split()) if b < 0: if (b-a+1)%2==0: print('Positive') else: print('Negative') elif a <= 0 and 0<=b: print('Zero') else: print('Positive')
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,175
s834342852
p04033
u257374434
1470013941
Python
Python (3.4.3)
py
Accepted
68
3188
298
def f(x): if x>0:return 1 elif x<0:return -1 elif x==0: return 0 a,b=list(map(int,input().split())) if a<= 0 and b>=0: print('Zero') if (a<0 and b<0) : if (b-a) %2: print('Positive') else: print('Negative') if (a>0 and b>0): print("Positive")
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,176
s715778643
p04033
u187945597
1470013838
Python
Python (2.7.6)
py
Accepted
26
2568
292
a,b = map(int,raw_input().split()) if a > 0 and b > 0 : print 'Positive' elif (a <= 0 and b >=0) : print 'Zero' else : if b == 0 : print 'Zero' else : if (b-a+1)%2 == 0 : print 'Positive' else : print 'Negative'
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,177
s604608907
p04033
u123756661
1470013832
Python
Python (2.7.6)
py
Accepted
26
2568
143
a,b=map(int,raw_input().split()) print 'Zero' if (a<0 and b>0) or (a==0 or b==0) else 'Negative' if b<0 and (a-b)%2==0 else 'Positive' exit()
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,178
s767009146
p04033
u914739916
1470013828
Python
Python (3.4.3)
py
Accepted
40
3064
295
a, b = map(int, input().split()) r = range(min(a, b), max(a, b) + 1) if 0 in r: print("Zero") else: if min(a, b) < 0: if (-min(a, b) + min(0, max(a, b)) + 1) % 2 == 0: print("Positive") else: print("Negative") else: print("Positive")
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,179
s419573942
p04033
u374099594
1470013812
Python
Python (2.7.6)
py
Accepted
28
2572
160
a, b = map(int, raw_input().split()) if a<=0<=b: print "Zero" else: if 0<a or (b-a+1)%2==0: print "Positive" else: print "Negative"
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,180
s090704580
p04033
u098968285
1470013768
Python
Python (3.4.3)
py
Accepted
38
3188
430
# def makelist(n, m): # return [[0 for i in range(m)] for j in range(n)] # a = int(input()) # b, c = map(int, input().split()) # s = input() b, c = map(int, input().split()) ans = 1 if b == 0 or c == 0 or (b < 0 and c > 0): ans = 0 elif b > 0 and c > 0: ans = 1 else: tmp = abs(b) - abs(c) if tmp % 2 == 0: an...
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,181
s685848113
p04033
u677049539
1470013760
Python
Python (2.7.6)
py
Accepted
27
2568
200
a,b = map(int, raw_input().split()) 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"
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,182
s980635802
p04033
u945080461
1470013745
Python
Python (2.7.6)
py
Accepted
27
2572
169
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'
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,183
s292362235
p04033
u562036212
1470013697
Python
Python (2.7.6)
py
Accepted
68
4768
820
# -*- coding: utf-8 -*- import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys def s(): return raw_input().strip() def n(): return int(raw_input()) def d(): return float(raw_input()) def ls(): return raw_input().strip().split() def ln(): return map(int, raw_input().strip().sp...
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,184
s785775145
p04033
u279013117
1470013664
Python
Python (2.7.6)
py
Accepted
29
2692
463
#!/usr/bin/env python from sys import stdin, stderr def solve(a, b): if a == 0 or b == 0: return 0 if a < 0 and b > 0: return 0 if a > 0: return 1 L = b-a+1 if (L % 2) == 0: return 1 else: return -1 def main(): a, b = map(int, stdin.readline().split()) res = solve(a, b) if res ...
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,185
s464041795
p04033
u402629484
1470013662
Python
Python (3.4.3)
py
Accepted
39
3316
203
a, b = [int(v) for v in input().split()] if(a<=0 and 0<=b): print("Zero") elif(1<=a): print("Positive") else: if( (b-a)%2==0 ): print("Negative") else: print("Positive")
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,186
s107864318
p04033
u010733367
1470013636
Python
Python (3.4.3)
py
Accepted
38
3188
318
a, b = map(int, input().split()) if a == 0: print("Zero") elif a > 0: print("Positive") elif a < 0: if b == 0: print("Zero") elif b > 0: print("Zero") else: temp = b - a + 1 if temp % 2 == 0: print("Positive") else: print("Negative")
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,187
s739675451
p04033
u315078622
1470013600
Python
Python (3.4.3)
py
Accepted
40
3064
214
a, b = map(int, input().split()) if a * b <= 0: print("Zero") else: assert(a > 0 or b < 0) if a > 0: print("Positive") else: print("Positive" if abs(a-b+1) % 2 == 0 else "Negative")
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,188
s228292099
p04033
u725662235
1470013597
Python
Python (2.7.6)
py
Accepted
27
2568
208
a,b = map(int,raw_input().split()) if a <= 0 and b >= 0: print "Zero" elif a < 0 and b < 0: if (b-a) % 2 == 0: print "Negative" else: print "Positive" else: print "Positive"
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,189
s643000385
p04033
u888742521
1470013576
Python
Python (2.7.6)
py
Accepted
26
2568
224
a, b = raw_input().split(" ") a = int(a) l = int(b) - a if a > 0: print "Positive" elif a == 0 or b == 0 or a + l > 0: print "Zero" else: if l % 2 != 0: print "Positive" else: print "Negative"
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,190
s298271123
p04033
u065683101
1470013568
Python
Python (3.4.3)
py
Accepted
38
3188
180
a, b = map(int, input().split()) if (a <= 0) and (0 <= b): print('Zero') elif (0 < a): print('Positive') else: if (b-a) % 2 == 0: print('Negative') else: print('Positive')
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,191
s813335018
p04033
u345737469
1470013545
Python
Python (2.7.6)
py
Accepted
27
2568
224
import sys A, B = map(int, sys.stdin.readline().split()) if 0 < A: print "Positive" elif A <= 0 and 0 <= B: print "Zero" else: if (B-A+1) % 2 == 0: print "Positive" else: print "Negative"
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,192
s109699860
p04033
u579875569
1470013528
Python
Python (3.4.3)
py
Accepted
37
3188
193
a, b = list(map(int, input().split())) if a > 0 and b > 0: print("Positive") elif a <= 0 and b >= 0: print("Zero") elif (a-b+1)%2==0: print("Positive") else: print("Negative")
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,193
s507230384
p04033
u116275728
1470013494
Python
Python (3.4.3)
py
Accepted
41
3064
391
a, b = map(int, input().split()) def solve(): if a == 0: return 0 elif a > 0: return 1 else: if b >= 0: return 0 else: if (b - a + 1) % 2 == 0: return 1 else: return -1 ret = solve() if ret == 1: print("P...
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,194
s155648927
p04033
u776189585
1470013484
Python
Python (2.7.6)
py
Accepted
26
2572
156
a, b = map(int, raw_input().split()) if a < 0 and b < 0 and (b-a)%2 == 0: print 'Negative' elif a <= 0 <= b: print 'Zero' else: print 'Positive'
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,195
s158892527
p04033
u620084012
1470013474
Python
Python (3.4.3)
py
Accepted
38
3188
175
a, b =map(int,input().split()) if a*b <= 0: print("Zero") elif a > 0 and b > 0: print("Positive") elif (a-b)%2 == 0: print("Negative") else: print("Positive")
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,196
s768715316
p04033
u810735437
1470013461
Python
Python (3.4.3)
py
Accepted
39
3188
272
#!/usr/bin/env python3 # -*- coding: utf-8 -*- a,b = map(int,input().split()) if a > 0: print("Positive") elif a <= 0 <= b: print("Zero") else: num = abs(a) - abs(b) + 1 if num % 2: print("Negative") else: print("Positive")
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,197
s371419334
p04033
u024612773
1470013455
Python
Python (3.4.3)
py
Accepted
38
3064
161
a,b=map(int,input().split()) if a > 0: print("Positive") elif a <= 0 and b >= 0: print("Zero") else: print("Positive" if (b-a)%2==1 else "Negative")
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,198
s221531005
p04033
u207056619
1470013427
Python
Python (3.4.3)
py
Accepted
43
3316
193
#!/usr/bin/env python3 a, b = map(int,input().split()) if a <= b < 0: ans = (b - a) % 2 and 'Positive' or 'Negative' elif 0 < a <= b: ans = 'Positive' else: ans = 'Zero' print(ans)
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,199
s813914288
p04033
u499893886
1470013408
Python
Python (3.4.3)
py
Accepted
40
3316
172
A,B=map(int,input().split()) if A==0 or B==0 or (A<=0 and B>=0): print("Zero") elif A > 0 or (B < 0 and (A-B)%2 == 1): print("Positive") else: print("Negative")
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,200
s817126903
p04033
u392220578
1470013395
Python
Python (3.4.3)
py
Accepted
38
3188
189
a, b = [int(x) for x in input().split()] if a > 0: print('Positive') elif a <= 0 and 0 <= b: print('Zero') elif (b - a) % 2 == 0: print('Negative') else: print('Positive')
p04033
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>You are given two integers <var>a</var> and <var>b</var> (<var>a≤b</var>). Determine if the product of the integers <var>a</var>, <var>a+1</var>, <var>…</var>, <var>b</var> is positive, negative or zero.</p> </section> </div> <div class="p...
1 3
Positive
1,209,201
s976882715
p04034
u477977638
1597081662
Python
Python (3.8.2)
py
Accepted
100
10376
696
import sys input=sys.stdin.buffer.readline #sys.setrecursionlimit(10**9) #from functools import lru_cache def RD(): return sys.stdin.read() def II(): return int(input()) def MI(): return map(int,input().split()) def MF(): return map(float,input().split()) def LI(): return list(map(int,input().split())) de...
p04034
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>We have <var>N</var> boxes, numbered <var>1</var> through <var>N</var>. At first, box <var>1</var> contains one red ball, and each of the other boxes contains one white ball.</p> <p>Snuke will perform the following <var>M</var> operations,...
3 2 1 2 2 3
2
1,209,202
s385087074
p04034
u102461423
1592592451
Python
Python (3.8.2)
py
Accepted
95
22496
385
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines N, M = map(int, readline().split()) m = map(int, read().split()) count = [1] * (N+1) red = [0] * (N+1) red[1] = True for x, y in zip(m, m): count[x] -= 1 count[y] += 1 if red[x]: re...
p04034
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>We have <var>N</var> boxes, numbered <var>1</var> through <var>N</var>. At first, box <var>1</var> contains one red ball, and each of the other boxes contains one white ball.</p> <p>Snuke will perform the following <var>M</var> operations,...
3 2 1 2 2 3
2
1,209,203
s289395503
p04034
u077291787
1569148377
Python
Python (3.4.3)
py
Accepted
92
25116
490
# AGC002B - Box and Ball def main(): N, M, *XY = map(int, open(0).read().split()) R = [0] * (N + 1) # red ball may be in box i R[1] = 1 C = [1] * (N + 1) # number of balls in box i (count) for x, y in zip(*[iter(XY)] * 2): R[y] = 1 if R[x] or R[y] else 0 # red ball may move from x to y ...
p04034
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>We have <var>N</var> boxes, numbered <var>1</var> through <var>N</var>. At first, box <var>1</var> contains one red ball, and each of the other boxes contains one white ball.</p> <p>Snuke will perform the following <var>M</var> operations,...
3 2 1 2 2 3
2
1,209,204
s948123498
p04035
u924828749
1601433479
Python
Python (3.8.2)
py
Accepted
92
20064
293
n,l = [int(x) for x in input().split()] x = [int(x) for x in input().split()] c = -1 for i in range(n-1): if x[i] + x[i+1] >= l: c = i break if c == -1: print("Impossible") else: print("Possible") for i in range(1,c+1): print(i) for i in range(1,n - c): print(n - i)
p04035
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>We have <var>N</var> pieces of ropes, numbered <var>1</var> through <var>N</var>. The length of piece <var>i</var> is <var>a_i</var>.</p> <p>At first, for each <var>i (1≤i≤N-1)</var>, piece <var>i</var> and piece <var>i+1</var> are tied at...
3 50 30 20 10
Possible 2 1
1,209,205
s835780788
p04035
u162612857
1601148753
Python
Python (3.8.2)
py
Accepted
90
19900
337
n, length = list(map(int, input().split())) nums = list(map(int, input().split())) idx = -1 for i in range(n-1): if nums[i] + nums[i+1] >= length: idx = i break if idx < 0: print('Impossible') exit() print('Possible') for i in range(idx): print(i+1) for i in reversed(range(idx, n-1)):...
p04035
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>We have <var>N</var> pieces of ropes, numbered <var>1</var> through <var>N</var>. The length of piece <var>i</var> is <var>a_i</var>.</p> <p>At first, for each <var>i (1≤i≤N-1)</var>, piece <var>i</var> and piece <var>i+1</var> are tied at...
3 50 30 20 10
Possible 2 1
1,209,206
s573520924
p04035
u651663683
1600820933
Python
PyPy3 (7.3.0)
py
Accepted
97
94752
283
n,l=map(int,input().split()) a=list(map(int,input().split())) f=True for i in range(n-1): if a[i]+a[i+1]>=l: print("Possible") print("\n".join([str(j) for j in range(1,i+1)]+[str(j) for j in range(n-1,i+1,-1)]+[str(i+1)])) f=False break if f: print("Impossible")
p04035
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>We have <var>N</var> pieces of ropes, numbered <var>1</var> through <var>N</var>. The length of piece <var>i</var> is <var>a_i</var>.</p> <p>At first, for each <var>i (1≤i≤N-1)</var>, piece <var>i</var> and piece <var>i+1</var> are tied at...
3 50 30 20 10
Possible 2 1
1,209,207
s592404298
p04035
u593081390
1600544343
Python
PyPy3 (7.3.0)
py
Accepted
94
87744
282
n,l=map(int,input().split()) a=list(map(int,input().split())) f=True for i in range(n-1): if a[i]+a[i+1]>=l: print("Possible") print("\n".join([str(j) for j in range(1,i+1)]+[str(j) for j in range(n-1,i+1,-1)]+[str(i+1)])) f=False break if f: print("Impossible")
p04035
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>We have <var>N</var> pieces of ropes, numbered <var>1</var> through <var>N</var>. The length of piece <var>i</var> is <var>a_i</var>.</p> <p>At first, for each <var>i (1≤i≤N-1)</var>, piece <var>i</var> and piece <var>i+1</var> are tied at...
3 50 30 20 10
Possible 2 1
1,209,208
s896217961
p04035
u892487306
1600104491
Python
Python (3.8.2)
py
Accepted
83
20008
554
def main(): N, L = list(map(int, input().split())) A = list(map(int, input().split())) max_len_knot, max_len = - 1, 0 for i in range(N - 1): if A[i] + A[i + 1] > max_len: max_len_knot = i max_len = A[i] + A[i + 1] if max_len < L: print('Impossible') else: ...
p04035
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>We have <var>N</var> pieces of ropes, numbered <var>1</var> through <var>N</var>. The length of piece <var>i</var> is <var>a_i</var>.</p> <p>At first, for each <var>i (1≤i≤N-1)</var>, piece <var>i</var> and piece <var>i+1</var> are tied at...
3 50 30 20 10
Possible 2 1
1,209,209
s351742805
p04035
u327466606
1599523311
Python
Python (3.8.2)
py
Accepted
89
21760
483
def solve(A,L): N = len(A) for i in range(N-1): if A[i]+A[i+1] >= L: pro = i break else: return None res = list(range(i))+list(reversed(range(i+1,N-1)))+[i] return res if __name__ == '__main__': N,L = map(int,input().split()) A = list(map(int,input...
p04035
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>We have <var>N</var> pieces of ropes, numbered <var>1</var> through <var>N</var>. The length of piece <var>i</var> is <var>a_i</var>.</p> <p>At first, for each <var>i (1≤i≤N-1)</var>, piece <var>i</var> and piece <var>i+1</var> are tied at...
3 50 30 20 10
Possible 2 1
1,209,210
s607861941
p04035
u007550226
1599255977
Python
Python (3.8.2)
py
Accepted
90
19996
307
n,l= map(int,input().split()) a= list(map(int,input().split())) rh=-1 for i in range(n-1): if a[i]+a[i+1]>=l: rh=i break else: print('Impossible') exit() print('Possible') if rh>0: for i in range(rh):print(i+1) if rh+1<n: for i in range(n-1,rh+1,-1):print(i) print(rh+1)
p04035
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>We have <var>N</var> pieces of ropes, numbered <var>1</var> through <var>N</var>. The length of piece <var>i</var> is <var>a_i</var>.</p> <p>At first, for each <var>i (1≤i≤N-1)</var>, piece <var>i</var> and piece <var>i+1</var> are tied at...
3 50 30 20 10
Possible 2 1
1,209,211
s430323194
p04035
u163783894
1599189236
Python
Python (3.8.2)
py
Accepted
86
18784
944
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines in_n = lambda: int(readline()) in_nn = lambda: map(int, readline().split()) in_s = lambda: readline().rstrip().decode('utf-8') in_nl = lambda: list(map(int, readline().split())) in_nl2 = lambda H: [in_n...
p04035
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>We have <var>N</var> pieces of ropes, numbered <var>1</var> through <var>N</var>. The length of piece <var>i</var> is <var>a_i</var>.</p> <p>At first, for each <var>i (1≤i≤N-1)</var>, piece <var>i</var> and piece <var>i+1</var> are tied at...
3 50 30 20 10
Possible 2 1
1,209,212
s332421034
p04035
u896741788
1598106260
Python
Python (3.8.2)
py
Accepted
82
19996
255
n,l=map(int,input().split()) t=list(map(int,input().split())) for i in range(n-1): if t[i]+t[i+1]>=l: print('Possible') print(*(list(range(1,i+1))+list(range(n-1,i+1,-1))),sep='\n') print(i+1) exit() print('Impossible')
p04035
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>We have <var>N</var> pieces of ropes, numbered <var>1</var> through <var>N</var>. The length of piece <var>i</var> is <var>a_i</var>.</p> <p>At first, for each <var>i (1≤i≤N-1)</var>, piece <var>i</var> and piece <var>i+1</var> are tied at...
3 50 30 20 10
Possible 2 1
1,209,213
s268750908
p04035
u113971909
1597944518
Python
Python (3.8.2)
py
Accepted
88
20092
324
n, k = map(int,input().split()) a = list(map(int,input().split())) idx = -1 for i in range(n-1): if a[i]+a[i+1]>=k: idx = i break if idx == -1: print('Impossible') exit() else: print('Possible') for i in range(1, idx+1): print(i) for i in range(n-1, idx, -1): prin...
p04035
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>We have <var>N</var> pieces of ropes, numbered <var>1</var> through <var>N</var>. The length of piece <var>i</var> is <var>a_i</var>.</p> <p>At first, for each <var>i (1≤i≤N-1)</var>, piece <var>i</var> and piece <var>i+1</var> are tied at...
3 50 30 20 10
Possible 2 1
1,209,214
s016546106
p04035
u678167152
1596936905
Python
Python (3.8.2)
py
Accepted
83
20528
395
from collections import deque def solve(): ans = ['Possible'] N, L = map(int, input().split()) A = list(map(int, input().split())) for i in range(N-1): if A[i]+A[i+1]>=L: ind = i break else: return ['Impossible'] for i in range(1,ind+1): ans.append(i) for i in range(N-1,ind+1,-1): ...
p04035
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>We have <var>N</var> pieces of ropes, numbered <var>1</var> through <var>N</var>. The length of piece <var>i</var> is <var>a_i</var>.</p> <p>At first, for each <var>i (1≤i≤N-1)</var>, piece <var>i</var> and piece <var>i+1</var> are tied at...
3 50 30 20 10
Possible 2 1
1,209,215
s595670922
p04035
u296150111
1596907942
Python
Python (3.8.2)
py
Accepted
95
20004
258
n,l=map(int,input().split()) a=list(map(int,input().split())) f=-1 for i in range(n-1): if a[i]+a[i+1]>=l: f=i break if f==-1: print("Impossible") exit() print("Possible") for i in range(n-1): if i<f: print(i+1) elif i>f: print(n-i+f) print(f+1)
p04035
<span class="lang-en"> <div class="part"> <section> <h3>Problem Statement</h3><p>We have <var>N</var> pieces of ropes, numbered <var>1</var> through <var>N</var>. The length of piece <var>i</var> is <var>a_i</var>.</p> <p>At first, for each <var>i (1≤i≤N-1)</var>, piece <var>i</var> and piece <var>i+1</var> are tied at...
3 50 30 20 10
Possible 2 1
1,209,216