s_id string | p_id string | u_id string | date string | language string | original_language string | filename_ext string | status string | cpu_time string | memory string | code_size string | code string | error string | stdout string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s244153294 | p04032 | u820461302 | 1565819555 | Python | Python (3.4.3) | py | Runtime Error | 54 | 4664 | 513 | # -*- coding: utf-8 -*-
from collections import Counter
# 文字列の入力
S = input()
# 文字列から部分文字列を抽出して偏りをチェック
counter = Counter(S)
# 最頻出の文字とその次の文字の出現回数を比較
if counter.most_common()[0][1] != counter.most_common()[1][1] :
# 文字の頻出分布をチェック counter.most_common())
print(S.index(counter.most_common()[0][0])+1,len(S)-sorted(S,reverse=True).index(counter.most_common()[0][0])+1)
else:
print("-1","-1") | Traceback (most recent call last):
File "/tmp/tmp2sucuwzt/tmp97e4v6oi.py", line 4, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s578360580 | p04032 | u227082700 | 1565658850 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 149 | s=input()
l=len(s)
for i in range(1,l)
if s[i-1]==s[i]:print(i,i+1);exit()
for i in range(2,l)
if s[i-2]==s[i]:print(i-1,i+1);exit()
print(-1,-1) | File "/tmp/tmpyvwwrwgj/tmp30_ecxli.py", line 3
for i in range(1,l)
^
SyntaxError: expected ':'
| |
s555131788 | p04032 | u762540523 | 1564856708 | Python | Python (3.4.3) | py | Runtime Error | 39 | 3188 | 383 | def main():
s = str(input())
sLen = len(s)
for i in range(sLen - 2):
if s[i] == s[i + 1]:
print(i + 1, i + 2)
return
elif s[i] == s[i + 2]:
print(i + 1, i + 3)
return
if s[sLen - 2] == s[sLen - 1]:
print(slen - 1, sLen)
return
print("-1 -1")
if __name__ == "__main__":
main()
| Traceback (most recent call last):
File "/tmp/tmpnx3mudo7/tmpn6j1o78k.py", line 19, in <module>
main()
File "/tmp/tmpnx3mudo7/tmpn6j1o78k.py", line 2, in main
s = str(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s376784920 | p04032 | u567434159 | 1562899524 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 298 | s = input()
for sz in [3, 5, 7, 9, 11, 13, 15, 17, 19, 21]
if sz > len(s):
break
for i in range(len(s) - sz + 1):
curr = s[i:i + sz]
for it in curr:
if curr.count(it) > sz // 2:
print(i + 1, i + sz)
exit(0)
print("-1 -1")
| File "/tmp/tmpuxzanwfb/tmpe3rjx6ef.py", line 2
for sz in [3, 5, 7, 9, 11, 13, 15, 17, 19, 21]
^
SyntaxError: expected ':'
| |
s353940890 | p04032 | u567434159 | 1562899407 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 295 | s = input()
for sz in [3, 5, 7, 9, 11, 13, 15, 17, 19, 21]
for i in range(len(s) - sz):
curr = s[i:i + sz]
if curr.count(curr[0]) > sz // 2 or curr.count(curr[1]) > sz // 2 or curr.count(curr[2]) > sz // 2:
print(i + 1, i + sz)
exit(0)
print("-1 -1")
| File "/tmp/tmpjxcptp2f/tmp8kohjpvy.py", line 2
for sz in [3, 5, 7, 9, 11, 13, 15, 17, 19, 21]
^
SyntaxError: expected ':'
| |
s092693704 | p04032 | u787456042 | 1562470590 | Python | Python (3.4.3) | py | Runtime Error | 59 | 3188 | 336 | s = input()
se = s[::2]
so = s[1::2]
ans = "-1 -1"
for i in range(len(s)-1) :
if s[i] == s[i+1] :
ans = str(i+1)+" "+str(i+2)
for i in range(len(se)-1) :
if se[i] == se[i+1] :
ans = str(2*i+1)+" "+str(2*i+3)
for i in range(len(se)-1) :
if so[i] == so[i+1] :
ans = str(2*i+2)+" "+str(2*i+4)
print(ans) | Traceback (most recent call last):
File "/tmp/tmpo3o0idvg/tmporqbxz7q.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s317031227 | p04032 | u570545890 | 1558727828 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 260 | def balance:
slen = len(S)
s = S + '##'
for i in range(slen):
if s[i] == s[i+1]:
return '{} {}'.format(i + 1, i + 2)
if s[i] == [i+2]:
return '{} {}'.format(i + 1, i + 3)
return '-1 -1'
S = input().strip()
print(balance(S)) | File "/tmp/tmpxkh27z8c/tmpmpl2tzso.py", line 1
def balance:
^
SyntaxError: expected '('
| |
s307969581 | p04032 | u570545890 | 1558727638 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3188 | 191 | S = input().strip()
slen = len(S)
s = S + '##'
for i in range(slen):
if s[i] == s[i+1]:
print(i+1, i+2)
exit()
if s[i] == [i+2]:
print(i+1, i+3)
exit()
print(-1, -1) | File "/tmp/tmpcx3kpi9y/tmphfdb_b1w.py", line 12
exit()
TabError: inconsistent use of tabs and spaces in indentation
| |
s606333958 | p04032 | u570545890 | 1558727599 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 191 | S = input().strip()
slen = len(S)
s = S + '##'
for i in range(slen):
if s[i] == s[i+1]:
print(i+1, i+2)
exit()
if s[i] == [i+2]:
print(i+1, i+3)
exit()
print(-1, -1) | File "/tmp/tmpwlej26h9/tmp1wkt__qp.py", line 12
exit()
TabError: inconsistent use of tabs and spaces in indentation
| |
s989124163 | p04032 | u644778646 | 1556200115 | Python | PyPy3 (2.4.0) | py | Runtime Error | 219 | 47340 | 645 | s = input()
l = []
t = s[0]
m = 1
for i in range(1,len(s)):
if s[i] == t:
m += 1
else:
t = s[i]
l.append(m)
m = 1
l.append(m)
if max(l) == 1:
print(-1,-1)
exit()
if len(l) == 1:
print(1,l[0])
if l[0] > 1:
print(1,l[0]+l[1])
exit()
ruiseki = [l[0]]
for i in range(1,len(l)):
ruiseki.append(ruiseki[i-1] + l[i])
for i in range(len(ruiseki)-1):
if ruiseki[i+1] - ruiseki[i] > 1 and i != len(ruiseki) - 2:
print(ruiseki[i],ruiseki[i+1])
exit()
if ruiseki[i+1] - ruiseki[i] > 1 and i == len(ruiseki) - 2:
print(ruiseki[i],ruiseki[i+1])
exit()
| Traceback (most recent call last):
File "/tmp/tmpi5ihxpb5/tmpkz6dyan0.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s048782913 | p04032 | u319818856 | 1554761690 | Python | Python (3.4.3) | py | Runtime Error | 56 | 3188 | 359 | def unbalanced(s: str) -> tuple:
for i in range(len(s) - 1):
c1, c2 = s[i], s[i + 1]
if c1 == c2:
return i+1, i+2
if i + 2 < len(s):
c3 = s[i + 2]
if c1 == c3:
return i+1, i+3
return False
if __name__ == "__main__":
s = input()
a, b = unbalanced(s)
print(a, b)
| Traceback (most recent call last):
File "/tmp/tmp_yr8m39_/tmpbwhfsd3m.py", line 14, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s007213086 | p04032 | u268516119 | 1553133135 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 799 | #アンバランスな文字列からアンバランスでない文字列を取り除くと、
#アンバランスな文字列が残るはず。ということは、両側から文字を削り取ることで「どの部分列をとってもアンバランスな文字列」が存在するはず
#すなわちそれは、両側に「ax」が存在しない文字列で、「axa」または「aa...aa」
#aaがある時点でアンバランス確定なので「axa」「aa」のどちらかを探せばよし
import re
s=input()
alphabet="abcdefghijklmnopqrstuvwxyz"
for i in alphabet:
ba=s.find(i+i)
if ba!=-1:
print(str(ba+1)+str(ba+2))
break
A=re.compile(i+"."+i)
axa=A.search(s,0)
if axa:
ba=axa.start())
print(str(ba+1)+str(ba+3))
break | File "/tmp/tmprsg4v_n1/tmp5oecsg1h.py", line 16
ba=axa.start())
^
SyntaxError: unmatched ')'
| |
s227108005 | p04032 | u914773681 | 1552681630 | Python | Python (3.4.3) | py | Runtime Error | 29 | 3444 | 666 | import re
def main():
s = input()
# for i in s:
l = list(set(s)) # 重複のない文字列の取得
ten = 1
for i in l:
# 文字列探査開始
j = 1
pattern = ''
while j < len(s):
pattern = i * j # 該当文字列iをj回繰り返す
matchOB = re.search(pattern, s)
if matchOB:
st = matchOB.start() # マッチした開始位置
en = matchOB.end() # マッチの終了位置
tu = matchOB.span() # マッチの位置をタプルで返す
elif not matchOB:
break
j = j + 1
if ten < en - st:
ten = en - st
an_en = en
an_st = st
print(an_st, an_en)
main() | Traceback (most recent call last):
File "/tmp/tmpos2zzqas/tmpimji8ps0.py", line 27, in <module>
main()
File "/tmp/tmpos2zzqas/tmpimji8ps0.py", line 4, in main
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s986040858 | p04032 | u190086340 | 1550257632 | Python | Python (3.4.3) | py | Runtime Error | 136 | 3188 | 884 | S = input()
def solve():
# print(S)
diff = ord("a")
head = 0
while head < len(S):
tail = head + 1
while tail <= len(S):
# print(S[head:tail])
table = [0 for _ in range(abs(ord("z") - ord("a")))]
for j in range(len(S[head:tail])):
# print("\t{}".format(S[head:tail][j:j+1]))
index = ord(S[head:tail][j:j+1]) - diff
table[index] += 1
# print(table[index], len(S[head:tail]), table[index] / len(S[head:tail]))
if len(S[head:tail]) >= 2 and table[index] / len(S[head:tail]) > 0.5:
# print("hit:" + S[head:tail])
# print(head + 1, tail)
return head + 1, tail
tail += 1
head += 1
# print("no hit")
return -1, -1
res = solve()
print(res[0], res[1])
| Traceback (most recent call last):
File "/tmp/tmp4znbjvrs/tmpo6u17226.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s881661128 | p04032 | u483645888 | 1549994149 | Python | Python (3.4.3) | py | Runtime Error | 44 | 3188 | 305 | def solve(s):
for i, j in zip(range(0, len(s)-1), range(1, len(s))):
if s[i] == s[j]:
return '{0} {1}'.format(i+1,j+1)
for i, j in zip(range(0, len(s)-2), range(2, len(s))):
if s[i] == s[j]:
return '{0} {1}'.format(i+1, j+1)
return '{0} {1}'.format(-1 -1)
print(solve(input()))
| Traceback (most recent call last):
File "/tmp/tmpjjw1rnga/tmpa8o3ffg1.py", line 10, in <module>
print(solve(input()))
^^^^^^^
EOFError: EOF when reading a line
| |
s046064729 | p04032 | u483645888 | 1549469844 | Python | Python (3.4.3) | py | Runtime Error | 39 | 3316 | 386 | s = input()
dic = {}
flag = False
for key in s:
if key not in dic:
dic[key] = 0
dic[key] += 1
for k, v in dic.items():
if len(s) % 2 == 0:
if v > len(s)/2:
answ = k
flag = True
elif len(s) % 2 == 1:
if v >= len(s)/2:
answ = k
flag = True
if flag == False:
print(-1, -1)
start = s.find(answ)+1
end = s.rfind(answ)+1
print(start, end) | Traceback (most recent call last):
File "/tmp/tmpecd0rqh1/tmp4od9xs60.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s036443330 | p04032 | u483645888 | 1549469647 | Python | Python (3.4.3) | py | Runtime Error | 38 | 3188 | 280 | s = input()
dic = {}
flag = False
for key in s:
if key not in dic:
dic[key] = 0
dic[key] += 1
for k, v in dic.items():
if v >= len(s)/2:
answ = k
flag = True
if flag == False:
print(-1, -1)
start = s.find(answ)+1
end = s.rfind(answ)+1
print(start, end) | Traceback (most recent call last):
File "/tmp/tmpx1l_1pl7/tmptlex_l_7.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s805817342 | p04032 | u811156202 | 1548628507 | Python | Python (3.4.3) | py | Runtime Error | 56 | 3188 | 546 | s = input()
checker = ''
if len(s) == 2:
if s[0] == s[1]:
print(1, 2)
checker += '*'
else:
print(-1, -1)
checker += '*'
if checker == '':
for a, b in zip(range(len(s)-1), range(1,len(s))):
if s[a] == s[b]:
print(a+1, b+1)
checker += '*'
break
if checker == '':
for a, c in zip(range(len(s)-2), range(2, len(s))):
if s[a] == s[c]:
print(a+1, c+1)
chekcher += '*'
break
if checker == '':
print(-1, -1)
| Traceback (most recent call last):
File "/tmp/tmpyixcnjzl/tmpv8uc3el6.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s484276288 | p04032 | u811156202 | 1548628410 | Python | Python (3.4.3) | py | Runtime Error | 63 | 11124 | 557 | s = input()
checker = ''
if len(s) == 2:
if s[0] == s[1]:
print(1, 2)
checker += '*'
else:
print(-1, -1)
checker += '*'
if checker == '':
for a, b in zip(range(len(s)-1), range(1,len(s))):
if s[a] == s[b]:
print(a+1, b+1)
checker += '*'
break
if checker == '':
for a, c in zip(list(range(len(s)-2)), list(range(2, len(s)))):
if s[a] == s[c]:
print(a+1, c+1)
chekcher += '*'
break
if checker == '':
print(-1, -1) | Traceback (most recent call last):
File "/tmp/tmp9fh1cf38/tmpjgoj3lhb.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s097665236 | p04032 | u811156202 | 1548628287 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 557 | s = input()
checker = ''
if len(s) <= 2:
if s[0] == s[1]:
print(1, 2)
checker += '*'
else:
print(-1, -1)
checker += '*'
if checker == ''
for a, b in zip(range(len(s)-1), range(1,len(s))):
if s[a] == s[b]:
print(a+1, b+1)
checker += '*'
break
if checker == '':
for a, c in zip(list(range(len(s)-2)), list(range(2, len(s)))):
if s[a] == s[c]:
print(a+1, c+1)
chekcher += '*'
break
if checker == '':
print(-1, -1)
| File "/tmp/tmprxwlv7s8/tmpp74pvnm_.py", line 14
if checker == ''
^
SyntaxError: expected ':'
| |
s023543307 | p04032 | u811156202 | 1548627764 | Python | Python (3.4.3) | py | Runtime Error | 65 | 11124 | 395 | s = input()
checker = ''
for a, b in zip(list(range(len(s)-1)), list(range(1,len(s)))):
if s[a] == s[b]:
print(a+1, b+1)
checker += '*'
break
if checker == '':
for a, c in zip(list(range(len(s)-2)), list(range(2, len(s)))):
if s[a] == s[c]:
print(a+1, c+1)
chekcher += '*'
break
if checker == '':
print(-1, -1)
| Traceback (most recent call last):
File "/tmp/tmpaxdqs2mb/tmpycschjz9.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s471155919 | p04032 | u513081876 | 1544818550 | Python | Python (3.4.3) | py | Runtime Error | 36 | 3188 | 245 | import sys
s = input()
N = len(s)
for i in range(N-2+1):
if s[i] == s[i+1]:
print(i+1, i+3)
sys.exit()
for i in range(N-3+1):
if s[i] == s[i+3]:
print(i+1, i+4)
sys.exit()
print(-1, -1) | Traceback (most recent call last):
File "/tmp/tmpm_q217xx/tmpev8tagvu.py", line 2, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s199234964 | p04032 | u022215787 | 1542513625 | Python | Python (3.4.3) | py | Runtime Error | 2111 | 4652 | 448 | S = list(input())
for i,c in enumerate(S):
if len(S[i:]) == 2:
subset = S[i:i+1]
if subset[0] == subset[1]:
print("%d %d" % (i+1, i+2))
break
continue
elif len(S[i:]) > 2:
subset = S[i:i+3]
if subset[0] in subset[1:] or subset[1] == subset[2]:
print("%d %d" % (i+1, i+3))
break
continue
else:
print("-1 -1") | Traceback (most recent call last):
File "/tmp/tmpwnrr50r3/tmpfejla5tz.py", line 1, in <module>
S = list(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s623979069 | p04032 | u754553095 | 1540667329 | Python | Python (3.4.3) | py | Runtime Error | 373 | 3316 | 683 | a=input()
if len(a)%2==0:
if (len(a)==2)&(len(list(set(a)))==1):
print("1 2")
else:
for i in range(len(a)-3):
b=sorted([a[i],a[i+1],a[i+2],a[i+3]])
c="".join(b)
d=list(set(a[i:i+4]))
if (len(d)==2)&(c!="{}".format(d[0]+d[0]+d[1]+d[1]))&(c!="{}".format(d[1]+d[1]+d[0]+d[0])):
print("{}".format(i+1)+" "+"{}".format(i+4))
break
else:
print("-1 -1")
else:
for j in range(len(a)-2):
e=list(set(a[i:i+3]))
if (len(e)==2) or (len(e)==1):
print("{}".format(i+1)+" "+"{}".format(i+3))
break
else:
print("-1 -1") | Traceback (most recent call last):
File "/tmp/tmpx3t140pa/tmpbrbvp1l5.py", line 1, in <module>
a=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s785197082 | p04032 | u754553095 | 1540666608 | Python | Python (3.4.3) | py | Runtime Error | 387 | 3316 | 646 | a=input()
if len(a)%2==0:
for i in range(len(a)-3):
b=sorted([a[i],a[i+1],a[i+2],a[i+3]])
c="".join(b)
d=list(set(a[i:i+4]))
if len(d)==1:
print("1 2")
else:
if (len(d)==2)&(c!="{}".format(d[0]+d[0]+d[1]+d[1]))&(c!="{}".format(d[1]+d[1]+d[0]+d[0])):
print("{}".format(i+1)+" "+"{}".format(i+4))
break
else:
print("-1 -1")
else:
for j in range(len(a)-2):
e=list(set(a[i:i+3]))
if (len(e)==2) or (len(e)==1):
print("{}".format(i+1)+" "+"{}".format(i+3))
break
else:
print("-1 -1") | Traceback (most recent call last):
File "/tmp/tmpp_5h4_f4/tmp2t1w6yhi.py", line 1, in <module>
a=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s814197726 | p04032 | u754553095 | 1540612107 | Python | Python (3.4.3) | py | Runtime Error | 367 | 3188 | 569 | a=input()
if len(a)%2==0:
for i in range(len(a)-3):
b=sorted([a[i],a[i+1],a[i+2],a[i+3]])
c="".join(b)
d=list(set(a[i:i+4]))
if (len(d)==2)&(c!="{}".format(d[0]+d[0]+d[1]+d[1]))&(c!="{}".format(d[1]+d[1]+d[0]+d[0])):
print("{}".format(i+1)+" "+"{}".format(i+4))
break
else:
print("-1 -1")
else:
for j in range(len(a)-2):
e=list(set(a[i:i+3]))
if len(e)==2 or len(e)==1:
print("{}".format(i+1)+" "+"{}".format(i+3))
break
else:
print("-1 -1") | Traceback (most recent call last):
File "/tmp/tmpp7w5913w/tmpba78ueua.py", line 1, in <module>
a=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s243399861 | p04032 | u754553095 | 1540610649 | Python | Python (3.4.3) | py | Runtime Error | 309 | 3316 | 593 | a=input()
if len(a)%2==0:
for i in range(len(a)-3):
b="{}".format(a[i]+a[i+1]+a[i+2]+a[i+3])
c=list(set(a[i:i+4]))
if (len(c)==2)&(b!="{}".format(c[0]+c[0]+c[1]+c[1]))&(b!="{}".format(c[1]+c[1]+c[0]+c[0])):
print("{}".format(i+1)+" "+"{}".format(i+4))
break
else:
print("-1 -1")
else:
for j in range(len(a)-2):
d="{}".format(a[j]+a[j+1]+a[j+2])
e=list(set(a[i:i+3]))
if len(e)==2 or len(e)==1:
print("{}".format(i+1)+" "+"{}".format(i+3))
break
else:
print("-1 -1") | Traceback (most recent call last):
File "/tmp/tmpk53w5z62/tmp_9e0jiqi.py", line 1, in <module>
a=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s546030011 | p04032 | u754553095 | 1540610464 | Python | Python (3.4.3) | py | Runtime Error | 325 | 3316 | 575 | a=input()
if len(a)%2==0:
for i in range(len(a)-3):
b="{}".format(a[i]+a[i+1]+a[i+2]+a[i+3])
c=list(set(a[i:i+4]))
if (len(c)==2)&(b!="{}".format(c[0]+c[0]+c[1]+c[1]))&(b!="{}".format(c[1]+c[1]+c[0]+c[0])):
print("{}".format(i+1)+" "+"{}".format(i+4))
break
else:
print("-1 -1")
else:
for j in range(len(a)-2):
d="{}".format(a[j]+a[j+1]+a[j+2])
e=list(set(a[i:i+3]))
if len(e)==2 or len(e)==1:
print("{}".format(i+1)+" "+"{}".format(i+3))
else:
print("-1 -1") | Traceback (most recent call last):
File "/tmp/tmpwm566_n_/tmp_m7wdrot.py", line 1, in <module>
a=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s990458193 | p04032 | u754553095 | 1540573276 | Python | Python (3.4.3) | py | Runtime Error | 2661 | 3188 | 334 | import math
a=input()
a1=list(a)
b=a1[:]
b.sort()
b="".join(b)
c=set(a1)
d=[]
for i in c:
for i1 in range(math.floor(len(a1)/2),len(a1)+1):
d.append(i*i1)
for i in d:
if i in b:
print("{}".format(a.find("{}".format(i[0]))+1)+" "+"{}".format(a.rfind("{}".format(i[0]))+1))
break
else:
print("-1 -1") | Traceback (most recent call last):
File "/tmp/tmpfvxexb21/tmpi13b9pas.py", line 2, in <module>
a=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s377370456 | p04032 | u883048396 | 1538101956 | Python | Python (3.4.3) | py | Runtime Error | 38 | 3188 | 183 | sS = input().rstrip()
iL = len(sS)
for i in range(iL-1):
if sS[i] == sS[i+1] :
print(i+1,i+2)
exit()
if sS[0] == sS[2]:
print("1 3")
exit()
print("-1 -1")
| Traceback (most recent call last):
File "/tmp/tmpojfbpprz/tmptlqi2vgx.py", line 1, in <module>
sS = input().rstrip()
^^^^^^^
EOFError: EOF when reading a line
| |
s518263547 | p04032 | u883048396 | 1538101328 | Python | Python (3.4.3) | py | Runtime Error | 54 | 3188 | 208 | sS = input().rstrip()
iL = len(sS)
if iL == 2:
print("-1 -1")
exit()
for i in range(iL-1):
if sS[i] == sS[i+1] or sS[i] == sS[i+2]:
print(i+1,i+3) #あぁ..
exit()
print("-1 -1")
| Traceback (most recent call last):
File "/tmp/tmpxugqwue6/tmpt5y3lyhy.py", line 1, in <module>
sS = input().rstrip()
^^^^^^^
EOFError: EOF when reading a line
| |
s591848852 | p04032 | u608088992 | 1537558096 | Python | Python (3.4.3) | py | Runtime Error | 42 | 4084 | 588 | S = list(input())
i = 0
while i < len(S)-2:
j = i+1
if S[i] == S[j]:
print(i, j)
break
else:
k = i+2
if S[i] == S[k] or S[j] == S[k]:
print(i, k)
break
else:
i += 3
else:
if i == len(S) - 2:
if S[i] == S[i+1]:
print(i, i+1)
elif S[i] == S[i+2]:
print(i, i+2)
elif S[i+1] == S[i+2]:
print(i+1, i+2)
else:
print(-1, -1)
elif i == len(S) - 1 and S[i] == S[i+1]:
print(i, i+1)
else:
print(-1, -1) | Traceback (most recent call last):
File "/tmp/tmpphu6bc1y/tmp9ssi1u7n.py", line 1, in <module>
S = list(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s002658151 | p04032 | u769852547 | 1533782777 | Python | Python (3.4.3) | py | Runtime Error | 54 | 3188 | 335 | import sys
s = input()
if len(s) == 2 and s[0] == s[1]:
print("0, 1")
sys.exit(0)
for i in range(len(s)-2):
if s[i] == s[i+1]:
print(i+1, i+2)
sys.exit(0)
if s[i] == s[i+2]:
print(i+1, i+3)
sys.exit(0)
if s[i+1] == s[i+2]:
print(i+2, i+3)
sys.exit(0)
print("-1 -1")
sys.exit(0) | Traceback (most recent call last):
File "/tmp/tmpgzjsnnek/tmpggzmzwur.py", line 2, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s548901409 | p04032 | u769852547 | 1533782624 | Python | Python (3.4.3) | py | Runtime Error | 57 | 3316 | 267 | import sys
s = input()
for i in range(len(s)-2):
if s[i] == s[i+1]:
print(i+1, i+2)
sys.exit(0)
if s[i] == s[i+2]:
print(i+1, i+3)
sys.exit(0)
if s[i+1] == s[i+2]:
print(i+2, i+3)
sys.exit(0)
print("-1 -1")
sys.exit(0) | Traceback (most recent call last):
File "/tmp/tmptgh5beu_/tmp3fp7urg4.py", line 2, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s910605370 | p04032 | u769852547 | 1533782497 | Python | Python (3.4.3) | py | Runtime Error | 54 | 3956 | 273 | import sys
s = list(input())
for i in range(len(s)-2):
if s[i] == s[i+1]:
print(i+1, i+2)
sys.exit(0)
if s[i] == s[i+2]:
print(i+1, i+3)
sys.exit(0)
if s[i+1] == s[i+2]:
print(i+2, i+3)
sys.exit(0)
print("-1 -1")
sys.exit(0) | Traceback (most recent call last):
File "/tmp/tmpyh79lz47/tmpq7suaz1p.py", line 2, in <module>
s = list(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s652730757 | p04032 | u729133443 | 1533373720 | Python | Python (3.4.3) | py | Runtime Error | 65 | 3188 | 168 | s=input()
n=len(s)
for i in range(n-1):
if s[i]==s[i+1]:
print(i+1,i+2)
break
elif i<n-1 and s[i]==s[i+2]:
print(i+1,i+3)
break
else:
print(-1,-1) | Traceback (most recent call last):
File "/tmp/tmpa4igc7hq/tmp7dyi3sjb.py", line 1, in <module>
s=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s998275874 | p04032 | u729133443 | 1533373677 | Python | Python (3.4.3) | py | Runtime Error | 64 | 3188 | 164 | s=input()
n=len(s)
for i in range(n-1):
if s[i]==s[i+1]:
print(i,i+1)
break
elif i<n-1 and s[i]==s[i+2]:
print(i,i+2)
break
else:
print(-1,-1) | Traceback (most recent call last):
File "/tmp/tmpmmbbpz3x/tmp3l5eljch.py", line 1, in <module>
s=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s874005490 | p04032 | u099566485 | 1531420766 | Python | Python (3.4.3) | py | Runtime Error | 51 | 3956 | 168 | w=list(input())
for i in range(len(w)):
if w[i]==w[i+1] or w[i]==w[i+2]:
print("{} {}".format(i+1,i+3))
break
else:
print("{} {}".format(-1,-1)) | Traceback (most recent call last):
File "/tmp/tmp2xjrsync/tmpql14ept8.py", line 1, in <module>
w=list(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s756215868 | p04032 | u112523623 | 1527700451 | Python | Python (3.4.3) | py | Runtime Error | 39 | 3188 | 319 | if __name__ == '__main__':
s = input()
for i in range(len(s) - 1):
if s[i] == s[i + 1]:
print("{} {}".format(i + 1, i + 2))
exit(0)
for i in range(len(s - 2)):
if s[i] == s[i + 2]:
print("{} {}".format(i + 1, i + 3))
exit(0)
print("-1 -1") | Traceback (most recent call last):
File "/tmp/tmpmzb71ff4/tmpadi2basc.py", line 2, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s456842513 | p04032 | u112523623 | 1527699227 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 694 | if __name__ == '__main__':
s = input()
d = {}
unbalanced = False
unbalanced_char = ''
for c in s:
if c in d:
d[c] += 1
unbalanced = (d[c] >= int(len(s) / 2))
if unbalanced:
unbalanced_char = c
break
else:
d[c] = 1
if unbalanced:
count = 0
start = s.find(unbalanced_char)
end = start
for i in range(start, len(s)):
if s[i] == unbalanced_char:
end = i
count += 1
if count >= int(len(s) / 2):
break
print(f"{start + 1} {end + 1}")
else:
print("-1 -1")
| Traceback (most recent call last):
File "/tmp/tmp_8p2kwgb/tmp7yai1m60.py", line 2, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s341331943 | p04032 | u268793453 | 1526624151 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 509 | import numpy as np
s = [ord(a)-ord('a') for a in input()]
n = len(s)
if n == 2:
if s[0] == s[1]:
print('1 2')
else
print('-1 -1')
exit()
cnt = np.array([0] * 26)
cum = [cnt.copy()]
for i, a in enumerate(s):
cnt[a] += 1
cum.append(cnt.copy())
def is_check(cum, n):
i = 3
d = 1
for j in range(n-i+1):
for k in cum[j+i] - cum[j]:
if k > d:
return j+1, j+i
return -1, -1
print(' '.join(map(str, is_check(cum, len(s))))) | File "/tmp/tmp54kcnxkk/tmp34yh1ebt.py", line 9
else
^
SyntaxError: expected ':'
| |
s979356040 | p04032 | u268793453 | 1526622966 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 555 | import numpy as np
s = [ord(a)-ord('a') for a in input()]
n = len(s)
if n == 2:
if s[0] == s[1]:
print('1 2')
else
print('-1 -1')
exit()
cnt = np.array([0] * 26)
cum = [cnt.copy()]
for i, a in enumerate(s):
cnt[a] += 1
cum.append(cnt.copy())
def is_check(cum, n):
for i in range(3, n+1, 2):
d = i // 2
for j in range(n-i+1):
for k in cum[j+i] - cum[j]:
if k > d:
return j+1, j+i
return -1, -1
print(' '.join(map(str, is_check(cum, len(s))))) | File "/tmp/tmp1gn5h06s/tmprex3nq28.py", line 9
else
^
SyntaxError: expected ':'
| |
s112862098 | p04032 | u158566391 | 1521904494 | Python | Python (3.4.3) | py | Runtime Error | 70 | 3188 | 159 | a=input()
for i in range(0,len(a)-1):
if a[i]==a[i+1]:
print(i+1,i+2)
exit()
elif i<len(a)-1:
if a[i]==a[i+2]:
print(i+1,i+3)
exit()
print(-1,-1) | Traceback (most recent call last):
File "/tmp/tmpng0rhcph/tmp6c4w5p7s.py", line 1, in <module>
a=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s089119714 | p04032 | u650245944 | 1503610141 | Python | Python (3.4.3) | py | Runtime Error | 112 | 3188 | 366 | s = input()
tc = [ chr(i)*2 for i in range(ord('a'), ord('z')+1) ] + [ chr(i)+chr(j)+chr(i) for i in range(ord('a'), ord('z')+1) for j in range(ord('a'), ord('z')+1)]
for i in tc:
if i in s:
t = i
break
else:
t = 0
if t == 0:
x=y=-1
for i in range(len(s)-len(t)+1):
if s[i:i+len(t)] == t:
x = i+1
y = i+len(t)
print(x, y) | Traceback (most recent call last):
File "/tmp/tmpovo9r58y/tmp_fstp1bl.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s564441990 | p04032 | u839537730 | 1501087854 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3188 | 218 | s = input()
a = -1
b = -1
for i in range(N-2):
if s[i]==s[i+1]:
a = i+1
b = i+2
break
elif s[i]==s[i+2]:
a = i+1
b = i+3
break
print(str(a)+" "+str(b)) | Traceback (most recent call last):
File "/tmp/tmpuly6u4hh/tmpeqe705ro.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s497319396 | p04032 | u584355711 | 1487394809 | Python | Python (3.4.3) | py | Runtime Error | 147 | 3188 | 498 | # -*- coding: utf-8 -*-
INF=10**10
def main():
str=input()
n=len(str)
if n==2:
if str[0]==str[1]:
print("1 2")
else:
print("-1 -1")
for i in range(n-1):
temp=str[i:i+3]
for j in range(2):
for k in range(j+1,3):
if temp[j]==temp[k]:
print("{0} {1}".format(i+1,i+3))
return 0
print("-1 -1")
if __name__=="__main__":
main()
| Traceback (most recent call last):
File "/tmp/tmpwak4x486/tmp32cv_8dv.py", line 25, in <module>
main()
File "/tmp/tmpwak4x486/tmp32cv_8dv.py", line 6, in main
str=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s347282120 | p04032 | u584355711 | 1487393569 | Python | Python (3.4.3) | py | Runtime Error | 127 | 3188 | 434 | # -*- coding: utf-8 -*-
INF=10**10
def main():
str=input()
n=len(str)
if n==2:
str("-1 -1")
return 0
for i in range(n-2):
temp=str[i:i+3]
for j in range(2):
for k in range(j+1,2):
if temp[j]==temp[k]:
print("{0} {1}".format(i+1,i+3))
return 0
print("-1 -1")
if __name__=="__main__":
main()
| Traceback (most recent call last):
File "/tmp/tmp2da4vu8z/tmp8yda8y7l.py", line 22, in <module>
main()
File "/tmp/tmp2da4vu8z/tmp8yda8y7l.py", line 6, in main
str=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s505056786 | p04032 | u711741418 | 1487106592 | Python | Python (3.4.3) | py | Runtime Error | 46 | 3188 | 411 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
s = input()
def search(s):
for i in range(len(s)-1):
if s[i] == s[i+1]:
return i+1, i+2
if s[i] == s[i+2]:
return i+1, i+3
return -1, -1
if __name__ == "__main__":
a, b = search(s)
if a == -1:
print("-1 -1")
else:
print(a, end="")
print(' ', end="")
print(b, end="")
| Traceback (most recent call last):
File "/tmp/tmp6o3rcqx6/tmpjp7gpupg.py", line 4, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s316503395 | p04032 | u591287669 | 1471283128 | Python | Python (3.4.3) | py | Runtime Error | 42 | 3064 | 235 | from pandas import Series
ser1 = Series(list(input()))
for w in range(2,len(ser1)+1):
for st in range(0,len(ser1)+1-w):
if ser1[st:st+w].value_counts()[0] > w/2:
print(st+1,st+w)
exit()
print(-1,-1)
| Traceback (most recent call last):
File "/tmp/tmpxd9hivt7/tmp190vj2bh.py", line 2, in <module>
ser1 = Series(list(input()))
^^^^^^^
EOFError: EOF when reading a line
| |
s822410002 | p04032 | u886545507 | 1471184469 | Python | Python (2.7.6) | py | Runtime Error | 71 | 2692 | 215 | #coding: utf-8
#ABC043D
import sys
s=raw_input()
for i in xrange(len(s)-1):
if s[i]==s[i+1]:
print i+1,i+2
sys.exit()
for i in xrange(len(s)-1):
if s[i]==s[i+2]:
print i+1,i+3
sys.exit()
print -1,-1
| File "/tmp/tmpsdcad8ra/tmp7u5g4vib.py", line 9
print i+1,i+2
^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s325810491 | p04032 | u277373937 | 1471142251 | Python | Python (2.7.6) | py | Runtime Error | 29 | 2568 | 385 | import sys
s = list(raw_input())
if len(s) == 2:
if s[0] == s[1]:
print 1, 2
else
print -1, -1
else:
for n in [3]:
for i in xrange(len(s) - n + 1):
sub = s[i:i+n]
for char in set(sub):
if sub.count(char) >= n / 2 + n % 2:
print i + 1, i + n
sys.exit()
print -1, -1
| File "/tmp/tmpy7gt_m6k/tmpu0a299cv.py", line 5
print 1, 2
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s382336504 | p04032 | u277373937 | 1471142072 | Python | Python (2.7.6) | py | Runtime Error | 26 | 2568 | 398 | import sys
s = list(raw_input())
if len(s) == 2:
if s[0] == s[1]:
print 1, 2
else
print -1, -1
else:
for n in range(3, len(s)):
for i in xrange(len(s) - n + 1):
sub = s[i:i+n]
for char in set(sub):
if sub.count(char) >= n / 2 + n % 2:
print i + 1, i + n
sys.exit()
print -1, -1
| File "/tmp/tmpi2udjthc/tmpqzibi_5l.py", line 5
print 1, 2
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s120774191 | p04032 | u277373937 | 1471141980 | Python | Python (2.7.6) | py | Runtime Error | 30 | 2568 | 395 | import sys
s = list(raw_input())
if len(s) == 2:
if s[0] == s[1]:
print 1, 2
else
print -1, -1
else:
for n in range(3, 100):
for i in xrange(len(s) - n + 1):
sub = s[i:i+n]
for char in set(sub):
if sub.count(char) >= n / 2 + n % 2:
print i + 1, i + n
sys.exit()
print -1, -1
| File "/tmp/tmprt_wyhme/tmppz4mvmwl.py", line 5
print 1, 2
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s971840761 | p04033 | u478417863 | 1601084402 | Python | PyPy3 (7.3.0) | py | Runtime Error | 81 | 68704 | 386 | 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]:
red[y] = 1
if not count[x]:
red[x] = 0
print(sum(red))
| Traceback (most recent call last):
File "/tmp/tmp1dd0vlhr/tmp7avbca4d.py", line 7, in <module>
N, M = map(int, readline().split())
^^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s552814198 | p04033 | u629540524 | 1600889773 | Python | Python (3.8.2) | py | Runtime Error | 30 | 8864 | 136 | a,b = map(int,input().split())
c= (b-a+1)*(a+b)//2
if c>0:
print("Positive")
elif c=0:
print("Zero")
else:
print("Negative") | File "/tmp/tmp6gnubnv1/tmpnr8l6df1.py", line 5
elif c=0:
^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s426788752 | p04033 | u318427318 | 1600120059 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9136 | 389 | #-*-coding:utf-8-*-
import sys
input=sys.stdin.readline
import itertools
def main():
a,b = map(int,input().split())
datas = list(range(a,b+1))
answer=1
if a == 0 or b ==0 or (a<0 and b>0):
print("Zero")
exit()
else:
if abs(a-b)%2!=0:
print("Positive")
else:
print("Negative")
if __name__=="__main__":
main() | Traceback (most recent call last):
File "/tmp/tmprmwx7zxx/tmpgjh73i9j.py", line 20, in <module>
main()
File "/tmp/tmprmwx7zxx/tmpgjh73i9j.py", line 7, in main
a,b = map(int,input().split())
^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s579550764 | p04033 | u318427318 | 1600119306 | Python | Python (3.8.2) | py | Runtime Error | 31 | 8956 | 393 | #-*-coding:utf-8-*-
import sys
input=sys.stdin.readline
import itertools
def main():
a,b = map(int,input().split())
datas = list(range(a,b+1))
answer=1
if 0 in datas:
print("Zero")
exit()
else:
for i in datas:
answer*=i
if answer>=0:
print("Positive")
else:
print("Negative")
if __name__=="__main__":
main() | Traceback (most recent call last):
File "/tmp/tmppz0j8zdn/tmphn2lkfv1.py", line 22, in <module>
main()
File "/tmp/tmppz0j8zdn/tmphn2lkfv1.py", line 7, in main
a,b = map(int,input().split())
^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s989601197 | p04033 | u977605150 | 1600094495 | Python | Python (3.8.2) | py | Runtime Error | 21 | 8996 | 206 | a, b = map(int, input().split())
c = b - a
if a <= 0 <= b:
print("Zero")
elif a > 0:
print("Positive")
elif b < 0:a
if c%2 == 1:
print("Positive")
else:
print("Negative") | File "/tmp/tmpzgtgpz4z/tmp1ftepykj.py", line 10
if c%2 == 1:
IndentationError: unexpected indent
| |
s900317931 | p04033 | u468972478 | 1599701193 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9140 | 207 | a, b = map(int, input().split())
s = list(range(a, b+1))
if 0 in s:
print("Zero")
else:
c = 0
for i in s:
if i < 0:
c += 1
if c % 2 == 0:
print("Positive")
else:
print("Negative") | Traceback (most recent call last):
File "/tmp/tmp4a1wkylu/tmpwf0nwk3i.py", line 1, in <module>
a, b = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s550919653 | p04033 | u980205854 | 1599404289 | Python | PyPy3 (7.3.0) | py | Runtime Error | 98 | 74536 | 195 | # C - Exception Handling
N = int(input())
A = [int(input()) for i in range(N)]
m1 = max(A)
i = 0
while A[i]<m1:
i += 1
m2 = max(A[:i]+A[i+1:])
for j in range(N):
print(m1 if i!=j else m2) | Traceback (most recent call last):
File "/tmp/tmp6yghd0xx/tmpd55whsbz.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s475684347 | p04033 | u336236846 | 1599331707 | Python | Python (3.8.2) | py | Runtime Error | 20 | 8740 | 360 | import math
var numero1 = -10 * 9, numero2 = 10 * - 9, cadena "1, 3,";
console.log( numero1 === numero2);
console.log( numero1 !== numero2;
console.log( numero1 < numero2);
console.log( numero1 > numero2);
console.log( numero1 <= numero2);
console.log( -90 >= 90);
document.write(numero1 === 1,3)
document.write(numero2 === "positive, 1*2*3 = 6")
return = 0 | File "/tmp/tmpe171440w/tmpgglsorix.py", line 2
var numero1 = -10 * 9, numero2 = 10 * - 9, cadena "1, 3,";
^^^^^^^
SyntaxError: invalid syntax
| |
s192725871 | p04033 | u968404618 | 1598495677 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9116 | 228 | a, b = map(int, input().split())
if a <= 0 and b >= 0:
print("Zero")
elif a < 0 and b < 0:
if len(list(range(a, b+1))) % 2:
print("Negative")
else:
print("Positive")
else:
print("Positive") | Traceback (most recent call last):
File "/tmp/tmp5tblmew5/tmp4dyjhlc1.py", line 1, in <module>
a, b = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s670500630 | p04033 | u968404618 | 1598495455 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9044 | 185 | a, b = map(int, input().split())
if a <= 0 and b >= 0:
print("Zero")
elif a < 0 and b < 0:
if len(list(range(a, b+1))) % 2:
print("Negative")
else:
print("Positive") | Traceback (most recent call last):
File "/tmp/tmprmcxzi50/tmppg123l_7.py", line 1, in <module>
a, b = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s355558543 | p04033 | u869265610 | 1597156410 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9136 | 263 | a,b=map(int,input().split())
if 0<a:
print("Positive")
exit()
W=list(range(a,b+1))
ne=0
if 0 in W:
print("Zero")
exit()
else:
for i in range(len(W)):
if W[i]<0:
ne+=1
if ne%2==0:
print("Positive")
else:
print("Negative")
| Traceback (most recent call last):
File "/tmp/tmpouvan5sd/tmpyydc0f0t.py", line 1, in <module>
a,b=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s561334733 | p04033 | u869265610 | 1597156195 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9180 | 216 | a,b=map(int,input().split())
W=list(range(a,b+1))
ne=0
if 0 in W:
print("Zero")
exit()
else:
for i in range(len(W)):
if W[i]<0:
ne+=1
if ne%2==0:
print("Positive")
else:
print("Negative")
| Traceback (most recent call last):
File "/tmp/tmpy6qd1bul/tmp5aj7uq4r.py", line 1, in <module>
a,b=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s609394970 | p04033 | u972658925 | 1597037031 | Python | Python (3.8.2) | py | Runtime Error | 29 | 8928 | 252 | a,b = map(int,input().split())
lst = list(range(a,b+1))
if a > 0 and b > 0:
print("Positive")
elif a <= 0 and b >= 0:
print("Zero")
elif a < 0 and b < 0:
if ((b-a)-1) % 2 != 0:
print("Negative")
else:
print("Positive") | Traceback (most recent call last):
File "/tmp/tmpoq0v73ma/tmpbw9hjyex.py", line 1, in <module>
a,b = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s137275194 | p04033 | u498575211 | 1596249543 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9160 | 430 | a, b = map(int, input().split())
ans = ""
if a > 0:
ans = "Positive"
elif a <= 0 and b >= 0:
ans = "Zero"
elif a < 0 and b < 0:
if (abs(a-b)+1) % 2 == 0:
ans = "Positive"
else:
ans = "Negative"
a, b = map(int, input().split())
ans = ""
if a > 0:
ans = "Positive"
elif a <= 0 and b >= 0:
ans = "Zero"
elif a < 0 and b < 0:
if (abs(a-b)+1) % 2 == 0:
ans = "Positive"
else:
ans = "Negative"
print(ans) | Traceback (most recent call last):
File "/tmp/tmp7_b2uvae/tmp23wvommc.py", line 1, in <module>
a, b = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s665716431 | p04033 | u942051624 | 1595896289 | Python | Python (3.8.2) | py | Runtime Error | 23 | 8960 | 330 | a,b=map(int,input().split())
if a>0 and b>0:
print('Positive')
exit()
elif a=0 or b=0:
print('Zero')
exit()
elif a<0 and 0<b:
if abs(a)%2==0:
print('Positive')
exit()
else:
print('Negative')
exit()
else:
if abs(b-a)%2==0:
print('Negative')
exit()
else:
print('Positive')
exit()
| File "/tmp/tmp27qp13w5/tmpef9s7t6o.py", line 6
elif a=0 or b=0:
^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s607057264 | p04033 | u661060077 | 1594426192 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8772 | 168 | if a > 0:
print('Positive')
if a <= 0 and b >= 0:
print('Zero')
else:
if (b - a + 1) % 2 == 0:
print('Positive')
else:
print('Negative') | Traceback (most recent call last):
File "/tmp/tmpowe69ci7/tmpsf0hw5ki.py", line 1, in <module>
if a > 0:
^
NameError: name 'a' is not defined
| |
s508734179 | p04033 | u694665829 | 1594318826 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8916 | 266 | a,b=map(int,inout().split())
if a>=0:
print("Positive" if a!=0 else "Zero")
if a<0 and b>0:
print("Zero")
if b<=0:
if b==0:
print("Zero")
else:
if (a-b+1)%2==0:
print("Positive")
else:
print("Negative") | Traceback (most recent call last):
File "/tmp/tmpd77zhg2v/tmpu0q1w5gv.py", line 1, in <module>
a,b=map(int,inout().split())
^^^^^
NameError: name 'inout' is not defined. Did you mean: 'input'?
| |
s233356287 | p04033 | u098982053 | 1594027487 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9180 | 227 | a,b = map(int,input().split())
if (a<0 and b>0) or a == 0 or b == 0:
print("Zero")
else:
nega = [i for i in list(range(a,b+1)) if i<0]
if len(nega)%2==0:
print("Positive")
else:
print("Negative") | Traceback (most recent call last):
File "/tmp/tmplh_ddsw8/tmp2m5pizeg.py", line 1, in <module>
a,b = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s240656002 | p04033 | u232873434 | 1593875031 | Python | PyPy3 (7.3.0) | py | Runtime Error | 100 | 74112 | 239 | a,b = map(int,input().split())
if (a>0) & (b>0):
print('Positive')
elif (a<0) & (b>0):
print('Zero')
elif (a==0) or(b==0):
print('Zero')
else:
if (b-a)%2==1:
print('Positive')
else:
print('Negative') | File "/tmp/tmphxnjnkco/tmppaxtmvrx.py", line 13
print('Negative')
^
SyntaxError: invalid non-printable character U+3000
| |
s975202849 | p04033 | u068142202 | 1593535834 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9164 | 268 | a, b = map(int, input().split())
numbers = list(range(a, b + 1))
if a <= 0:
if 0 <= b or a == 0 or b == 0:
print("Zero")
exit()
if len(numbers) % 2 != 0:
print("Negative")
else:
print("Positive")
else:
print("Positive")
| Traceback (most recent call last):
File "/tmp/tmp_r_11cru/tmpzct1_v6a.py", line 1, in <module>
a, b = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s888929671 | p04033 | u068142202 | 1593535660 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9168 | 246 | a, b = map(int, input().split())
numbers = list(range(a, b + 1))
if a < 0:
if 0 < b:
print("Zero")
exit()
if len(numbers) % 2 != 0:
print("Negative")
else:
print("Positive")
else:
print("Positive")
| Traceback (most recent call last):
File "/tmp/tmp7cfm1r4u/tmpxs383n0d.py", line 1, in <module>
a, b = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s155511687 | p04033 | u068142202 | 1593535343 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9168 | 251 | a, b = map(int, input().split())
numbers = list(range(a, b + 1))
if a < 0:
if 0 < b:
print("Zero")
exit()
if numbers.index(-1) % 2 != 0:
print("Positive")
else:
print("Negative")
else:
print("Positive")
| Traceback (most recent call last):
File "/tmp/tmp6ng5_qmx/tmpabteg8e1.py", line 1, in <module>
a, b = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s271398160 | p04033 | u068142202 | 1593535281 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9128 | 253 | a, b = map(int, input().split())
numbers = list(range(a, b + 1))
if a < 0:
if 0 < b:
print("Zero")
exit()
elif numbers.index(-1) % 2 != 0:
print("Positive")
else:
print("Negative")
else:
print("Positive")
| Traceback (most recent call last):
File "/tmp/tmp830ew1x0/tmpmnzmysf_.py", line 1, in <module>
a, b = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s500387948 | p04033 | u068142202 | 1593535238 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9168 | 238 | a, b = map(int, input().split())
numbers = list(range(a, b + 1))
if a < 0:
if 0 < b:
print("Zero")
elif numbers.index(-1) % 2 != 0:
print("Positive")
else:
print("Negative")
else:
print("Positive")
| Traceback (most recent call last):
File "/tmp/tmpak7npa51/tmpiteafwyp.py", line 1, in <module>
a, b = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s508615445 | p04033 | u492737043 | 1593486237 | Python | Python (3.8.2) | py | Runtime Error | 22 | 9136 | 165 | a,b=map(int,input().split())
if ab<=0:
print('Zero')
elif a>0:
print('Positive')
elif b<0:
if (b-a+1)%2==0:
print('Positive')
else:
print('Negative') | Traceback (most recent call last):
File "/tmp/tmpq1mr1649/tmpx3lert1w.py", line 1, in <module>
a,b=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s248262293 | p04033 | u841021102 | 1592960135 | Python | Python (3.8.2) | py | Runtime Error | 22 | 8768 | 177 | a, b = map(int(input().split())
if a > 0:
print("Positive")
elif a < 0 :
if (b - a) % 2 == 0 :
print("Positive")
else:
print("Negative")
else:
print("Zero") | File "/tmp/tmpfwncy5l6/tmp8k9isryy.py", line 1
a, b = map(int(input().split())
^
SyntaxError: '(' was never closed
| |
s671547226 | p04033 | u864276028 | 1592883254 | Python | Python (3.8.2) | py | Runtime Error | 20 | 9032 | 187 | a,b = map(int, input().split())
L = []
for i in range (a,b+1):
L.append(i)
P = 1
for j in L:
P *= j
if P > 0:
print('Positive')
elif P = 0:
print('Zero')
else:
print('Negetive') | File "/tmp/tmpbntrr2xv/tmpfynm2hzd.py", line 10
elif P = 0:
^^^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s119183800 | p04033 | u034624359 | 1592443112 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 170 | a,b=int(input().split())
k=1
for i in range(a,b+1):
k=k*i
if k>0:
print("Positive")
return
elif k=0:
print("Zero")
return
elif k<0:
print("Negative")
return | File "/tmp/tmpw73amn_n/tmpbp98csmb.py", line 8
elif k=0:
^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s311085572 | p04033 | u364386647 | 1591911470 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 261 | def resolve():
a, b = list(map(int, input().split()))
l = list(range(a, b + 1))
if a <= 0 and b >= 0:
print('Zero')
elif b < 0 and (b - a + 1) % 2 == 1:
print('Negative')
else:
print('Positive')
return
resolve() | Traceback (most recent call last):
File "/tmp/tmpgusv7b51/tmpbl9w3x7s.py", line 13, in <module>
resolve()
File "/tmp/tmpgusv7b51/tmpbl9w3x7s.py", line 2, in resolve
a, b = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s500252079 | p04033 | u364386647 | 1591911244 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 314 | def resolve():
a, b = list(map(int, input().split()))
l = list(range(a, b + 1))
if a <= 0 and b >= 0:
print('Zero')
elif a > 0:
print('Positive')
else:
if (b - a) % 2 == 0:
print('Negative')
else:
print('Positive')
return
resolve() | Traceback (most recent call last):
File "/tmp/tmpoqs6bbo5/tmpivs2v432.py", line 17, in <module>
resolve()
File "/tmp/tmpoqs6bbo5/tmpivs2v432.py", line 2, in resolve
a, b = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s020190622 | p04033 | u364386647 | 1591910797 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 345 | def resolve():
a, b = list(map(int, input().split()))
l = list(range(a, b + 1))
if 0 < a and a <= b:
print('Positive')
elif a <= b and b < 0:
if (b - a + 1) % 2 == 0:
print('Positive')
else:
print('Negative')
elif a <= 0 and 0 <= b:
print('Zero')
return
resolve() | Traceback (most recent call last):
File "/tmp/tmpqw3ssuol/tmpp8kbzq4r.py", line 16, in <module>
resolve()
File "/tmp/tmpqw3ssuol/tmpp8kbzq4r.py", line 2, in resolve
a, b = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s489127638 | p04033 | u364386647 | 1591910601 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3316 | 433 | def resolve():
a, b = list(map(int, input().split()))
l = list(range(a, b + 1))
l.sort()
minus = list(filter(lambda x: x < 0, l))
minus = len(minus)
if a <= 0 and b >= 0:
print('Zero')
return
if a < 0 and b < 0:
minus = len(range(a, b + 1))
if minus % 2 == 1:
print('Negative')
return
else:
print('Positive')
return
return
resolve() | Traceback (most recent call last):
File "/tmp/tmp2m0dy2ko/tmpw7_b3mwz.py", line 24, in <module>
resolve()
File "/tmp/tmp2m0dy2ko/tmpw7_b3mwz.py", line 2, in resolve
a, b = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s433475079 | p04033 | u364386647 | 1591910275 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 404 | def resolve():
a, b = list(map(int, input().split()))
l = list(range(a, b + 1))
l.sort()
minus = list(filter(lambda x: x < 0, l))
minus = len(minus)
if a <= 0 and b >= 0:
print('Zero')
return
else:
if minus % 2 == 1:
print('Negative')
return
else:
print('Positive')
return
return
resolve() | Traceback (most recent call last):
File "/tmp/tmpd3i_maex/tmp3bx9if8i.py", line 21, in <module>
resolve()
File "/tmp/tmpd3i_maex/tmp3bx9if8i.py", line 2, in resolve
a, b = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s698357168 | p04033 | u364386647 | 1591910183 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 392 | def resolve():
a, b = list(map(int, input().split()))
l = list(range(a, b + 1))
l.sort()
minus = list(filter(lambda x: x < 0, l))
minus = len(minus)
if 0 in l:
print('Zero')
return
else:
if minus % 2 == 1:
print('Negative')
return
else:
print('Positive')
return
return
resolve() | Traceback (most recent call last):
File "/tmp/tmpz53yju23/tmpl_ky3o4b.py", line 20, in <module>
resolve()
File "/tmp/tmpz53yju23/tmpl_ky3o4b.py", line 2, in resolve
a, b = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s959414083 | p04033 | u364386647 | 1591910063 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 380 | def resolve():
a, b = list(map(int, input().split()))
l = list(range(a, b + 1))
minus = list(filter(lambda x: x < 0, l))
minus = len(minus)
if 0 in l:
print('Zero')
return
else:
if minus % 2 == 1:
print('Negative')
return
else:
print('Positive')
return
return
resolve() | Traceback (most recent call last):
File "/tmp/tmpf0hk2e4v/tmp_xekjb_r.py", line 20, in <module>
resolve()
File "/tmp/tmpf0hk2e4v/tmp_xekjb_r.py", line 2, in resolve
a, b = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s762245529 | p04033 | u665369939 | 1591647247 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 236 | a,b = map(int,input().split())
if a>=0:
print('Positive')
elif a<=0 and b>=0:
if abs(a)%2 == 0:
print('Positive')
else:
print('Negative')
else:
if abs(b-a)%2 == 0:
print('Positive')
else:
print('Negative') | File "/tmp/tmpsfrjbvq2/tmpv99oykep.py", line 6
print('Positive')
TabError: inconsistent use of tabs and spaces in indentation
| |
s423735064 | p04033 | u213580455 | 1590103587 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 1221 | redBalls = []
currentRedBall = 0
def putBall(i, balles, routes):
global redBalles
global currentRedBall
if i == len(routes):
redBalles[currentRedBall] = 1
return None
_from = routes[i][0]-1
_to = routes[i][1]-1
if balles[_from]%2 == 0:
balles[_from] -= 2
balles[_to] += 2
putBall(i+1, balles, routes)
else:
if balles[_from] == 1:
balles[_from] -= 1
balles[_to] += 1
currentRedBall = _to
putBall(i+1, balles, routes)
else:
_balles = [b for b in balles]
_balles[_from] -= 1
_balles[_to] += 1
currentRedBall = _to
putBall(i+1, _balles, routes)
_balles = [b for b in balles]
_balles[_from] -= 2
_balles[_to] += 2
currentRedBall = _from
putBall(i+1, _balles, routes)
def answer(n, routes):
global redBalles
redBalles = [0]*n
balles = [1] + [2]*(n-1)
putBall(0, balles, routes)
return sum(redBalles)
n, m = map(int, input().split())
routes = []
for _ in range(m):
routes.append(list(map(int, input().split())))
print(answer(n, routes)) | Traceback (most recent call last):
File "/tmp/tmp6g7udu2a/tmpd_8tckfo.py", line 42, in <module>
n, m = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s011343039 | p04033 | u680503348 | 1590079600 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 780 | # For taking integer inputs.
def inp():
return(int(input()))
# For taking List inputs.
def inlist():
return(list(map(int, input().split())))
# For taking string inputs. Actually it returns a List of Characters, instead of a string, which is easier to use in Python, because in Python, Strings are Immutable.
def instr():
s = input()
return(list(s[:len(s)]))
# For taking space seperated integer variable inputs.
def invr():
return(map(int, input().split()))
a, b = invr()
res = "Negative"
if a > 0 and b > 0:
res = "Positive"
if a < 0 and b < 0:
temp = abs(abs(a)-abs(b)) + 1
if temp % 2 == 0:
res = "positive"
else:
res = "Negative"
if a == b:
res = "Positive"
if a <= 0 and b = > 0:
res = "Zero"
print(res)
| File "/tmp/tmpxwnmm60w/tmpbcipgjds.py", line 36
if a <= 0 and b = > 0:
^
SyntaxError: invalid syntax
| |
s338204126 | p04033 | u779293207 | 1589218787 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 158 | a,b=map(int,input().split())
if a<=b<0:
if
print('Negative' if (-1)**(a-b-1)==-1 else 'Positive')
elif a<=0<=b:
print('Zero')
else:
print('Positive') | File "/tmp/tmplhcsmtdx/tmp5vqavlyn.py", line 3
if
^
SyntaxError: invalid syntax
| |
s955853453 | p04033 | u711238850 | 1589029074 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 199 | a,b = tuple(map(int,input().split()))
if a=<0 and b>=0:
print("Zero")
elif a<0 and b<0:
if (b-a+1)%2==0:
print("Positive")
else:
print("Negative")
elif a>0 and b>0:
print("Positive")
| File "/tmp/tmpexzbflfg/tmpkx1ltmkc.py", line 3
if a=<0 and b>=0:
^
SyntaxError: invalid syntax
| |
s141593142 | p04033 | u057964173 | 1588518739 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3188 | 308 | import sys
def input(): return sys.stdin.readline().strip()
def resolve():
a,b=map(int, input().split())
l=list(range(a,b+1))
seki=1
for i in l:
seki=seki*i
if seki>0:
print('Positive')
elif seki==0:
print('Zero')
else:
print('Negative')
resolve() | Traceback (most recent call last):
File "/tmp/tmpjnm3j3bn/tmpoir8a9y_.py", line 16, in <module>
resolve()
File "/tmp/tmpjnm3j3bn/tmpoir8a9y_.py", line 5, in resolve
a,b=map(int, input().split())
^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s929516157 | p04033 | u057964173 | 1588516206 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 304 | import sys
def input(): return sys.stdin.readline().strip()
def resolve():
a,b=map(int, input().split())
l=list(range(a,b+1))
seki=1
for i in l:
seki*=i
if seki>0:
print('Positive')
elif seki==0:
print('Zero')
else:
print('Negative')
resolve() | Traceback (most recent call last):
File "/tmp/tmp3b_0jz46/tmpc5ypqlez.py", line 16, in <module>
resolve()
File "/tmp/tmp3b_0jz46/tmpc5ypqlez.py", line 5, in resolve
a,b=map(int, input().split())
^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s849556216 | p04033 | u057964173 | 1588515812 | Python | PyPy3 (2.4.0) | py | Runtime Error | 187 | 38384 | 304 | import sys
def input(): return sys.stdin.readline().strip()
def resolve():
a,b=map(int, input().split())
l=list(range(a,b+1))
seki=1
for i in l:
seki*=i
if seki>0:
print('Positive')
elif seki==0:
print('Zero')
else:
print('Negative')
resolve() | Traceback (most recent call last):
File "/tmp/tmpbcsm6tpt/tmpj25v2tck.py", line 16, in <module>
resolve()
File "/tmp/tmpbcsm6tpt/tmpj25v2tck.py", line 5, in resolve
a,b=map(int, input().split())
^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s965887030 | p04033 | u263933075 | 1588085985 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 156 | a=list(map(int,input().split()))
b=1
for i in range(a[0],a[1]+1):
b*=i
if b>0:
print('Positive')
elif b<0:
print('Negative')
elif b=0:
print('Zero') | File "/tmp/tmpxg8qnhce/tmpkcantrfh.py", line 9
elif b=0:
^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s728269288 | p04033 | u021548497 | 1587166340 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 159 | a, b = map(int, input())
if a*b < 0:
print("Zero")
elif a > 0:
print("Positive")
else:
if (b-a)%2:
print("Positive")
else:
print("Negative")
| Traceback (most recent call last):
File "/tmp/tmpp2w90bqs/tmp3iz239og.py", line 1, in <module>
a, b = map(int, input())
^^^^^^^
EOFError: EOF when reading a line
| |
s261777375 | p04033 | u262244504 | 1586200921 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 179 | ans=a
c=a
if a==b :
ans=a**b
else:
while c<=b:
c=c+1
ans=ans*c
pm = numpy.sign(ans)
if pm==0:
print('zero')
elif pm==1:
print('Positive')
else:
print('Negative') | Traceback (most recent call last):
File "/tmp/tmptfc0k2gz/tmpsnqy_z7q.py", line 1, in <module>
ans=a
^
NameError: name 'a' is not defined
| |
s327348712 | p04033 | u602677143 | 1584581409 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 263 | a,b,c = map(int,input().split())
if (a > 0 and b > 0) or (a > b and a > 0) or (b > a and b > 0):
print("Positive")
elif (a-b) == 0 or (b-a) == 0:
print("Zero")
elif (a < 0 and b < 0) or (a > b and a < 0) or (b > a and b < 0):
print("Negative")
print() | Traceback (most recent call last):
File "/tmp/tmprlgui_8i/tmps52ct5ub.py", line 1, in <module>
a,b,c = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.