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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s759174244 | p03994 | u584174687 | 1568316957 | Python | PyPy3 (2.4.0) | py | Runtime Error | 200 | 50028 | 670 | from collections import Counter, defaultdict
import sys
sys.setrecursionlimit(10 ** 5 + 10)
# input = sys.stdin.readline
from math import factorial
import heapq, bisect
import math
import itertools
import queue
from collections import deque
def main():
s = list(input())
num = int(input())
for i in ra... | Traceback (most recent call last):
File "/tmp/tmpat17rokn/tmptzallta_.py", line 39, in <module>
main()
File "/tmp/tmpat17rokn/tmptzallta_.py", line 18, in main
s = list(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s468904354 | p03994 | u167681750 | 1568168531 | Python | Python (3.4.3) | py | Runtime Error | 75 | 4796 | 200 | s = [ord(i) - 97 for i in input()]
k = int(input())
for i in range(len(s)):
if 26 - s[i] <= k:
k -= 26 - s[i]
s[i] = 0
s[-1] += k
ans = "".join(chr(i+97) for i in s)
print(ans)
| Traceback (most recent call last):
File "/tmp/tmpetl7iceu/tmp4ftxebec.py", line 1, in <module>
s = [ord(i) - 97 for i in input()]
^^^^^^^
EOFError: EOF when reading a line
| |
s445983762 | p03994 | u497046426 | 1567744652 | Python | Python (3.4.3) | py | Runtime Error | 2266 | 109388 | 382 | S = input()
K = int(input())
length = len(S)
alpha, n = 'abcdefghijklmnopqrstuvwxyz', 26
i = 0
ans = ''
while i < length:
diff = (n - (ord(S[i]) - ord('a'))) % 26
if 0 <= diff <= K:
ans += 'a'
K -= diff
else:
ans += S[i]
i += 1
if K == 0:
ans += S[i:]
el... | Traceback (most recent call last):
File "/tmp/tmpejpjr6ue/tmpz9v2pwt1.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s956288975 | p03994 | u497046426 | 1567744642 | Python | Python (3.4.3) | py | Runtime Error | 2336 | 109516 | 395 | S = input()
K = int(input())
length = len(S)
alpha, n = 'abcdefghijklmnopqrstuvwxyz', 26
i = 0
ans = ''
while i < length:
diff = (n - (ord(S[i]) - ord('a'))) % 26
if 0 <= diff <= K:
ans += 'a'
K -= diff
else:
ans += S[i]
i += 1
if K == 0:
ans += S[i:]
el... | Traceback (most recent call last):
File "/tmp/tmp9jpu2q0j/tmpltqbv29l.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s046914576 | p03994 | u802772880 | 1562185211 | Python | Python (3.4.3) | py | Runtime Error | 1540 | 3468 | 271 | s=input()
k=int(input())
alpha=[chr(i) for i in range(97, 97+26)]
for i in range(len(s)):
if i==len(s)-1:
k%=26
s=s[:i]+alpha[k+alpha.index(s[i])]
elif k>=26-alpha.index(s[i]):
k-=26-alpha.index(s[i])
s=s[:i]+'a'+s[i+1:]
print(s) | Traceback (most recent call last):
File "/tmp/tmpf1ices6w/tmpfi31zmad.py", line 1, in <module>
s=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s240073313 | p03994 | u798129018 | 1560548045 | Python | PyPy3 (2.4.0) | py | Runtime Error | 222 | 52344 | 409 | s = list(input())
K = int(input())
for i in range(len(s)-1):
if K == 0:
break
else:
if s[i] == "a":
continue
else:
if 123-ord(s[i]) <= K:
K -= 123-ord(s[i])
s[i] = "a"
K = K %26
if K > 0:
if ord(s[-1])+K <= 122:
s[-1] =... | Traceback (most recent call last):
File "/tmp/tmp_q52bgjg/tmpjcaq0zq4.py", line 1, in <module>
s = list(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s007151259 | p03994 | u923712635 | 1560348585 | Python | Python (3.4.3) | py | Runtime Error | 54 | 3316 | 346 | s = input()
K = int(input())
ans = ''
for ind,i in enumerate(s):
if(i=='a' and ind!=len(s)-1):
ans+='a'
continue
n = ord(i)
d = 122-n
if(ind==len(S)-1):
K%=26
if(K>d):
K-=d+1
ans+='a'
elif(ind==len(s)-1):
K%=26
ans+=chr(ord(i)+K)
else:
... | Traceback (most recent call last):
File "/tmp/tmpehsr0pd0/tmpmlo8e3z6.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s879178950 | p03994 | u623819879 | 1560203077 | Python | PyPy3 (2.4.0) | py | Runtime Error | 176 | 38384 | 423 | #n,x=map(int,input().split())
#a=[int(i) for i in input().split()]
import string
alp=string.ascii_lowercase
di={}
for i in range(26):
di[alp[i]]=i
s=input()
a=[]
for i in s:
a.append(i)
l=a.pop()
if a:
a=a[::-1]
k=int(input())
ans=''
i=0
while a:
t=a.pop()
d=(26-di[t])%26
if d<=k:
k-=d
... | File "/tmp/tmp_wxqsxqv/tmplff78jc4.py", line 26
i+=1
^
IndentationError: expected an indented block after 'else' statement on line 24
| |
s319765556 | p03994 | u969190727 | 1559869754 | Python | Python (3.4.3) | py | Runtime Error | 87 | 4220 | 330 | s=input()
k=int(input())
A={}
for i in range(26):
A[chr(ord('a')+i)]=26-i
C=[]
for ss in s:
C.append(A[ss])
ans=""
for i in range(len(s)):
if i==len(s)-1:
if ord(s[-1])+k>122:
ans+=chr(ord(s[-1])+k-26)
else:
ans+=chr(ord(s[-1])+k)
elif k>=C[i]:
ans+="a"
k-=C[i]
else:
ans+=s[i]
... | Traceback (most recent call last):
File "/tmp/tmpqls8sn1a/tmpx57ywz_3.py", line 1, in <module>
s=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s172182358 | p03994 | u969190727 | 1559869503 | Python | Python (3.4.3) | py | Runtime Error | 86 | 4212 | 263 | s=input()
k=int(input())
A={}
for i in range(26):
A[chr(ord('a') + i)]=26-i
C=[]
for ss in s:
C.append(A[ss])
ans=""
for i in range(len(s)):
if i==len(s)-1:
ans+=chr(ord(s[-1])+k)
elif k>=C[i]:
ans+="a"
k-=C[i]
else:
ans+=s[i]
print(ans) | Traceback (most recent call last):
File "/tmp/tmphiry6tzq/tmp_a92xcgi.py", line 1, in <module>
s=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s838939721 | p03994 | u885899351 | 1557948879 | Python | Python (3.4.3) | py | Runtime Error | 88 | 4980 | 218 | s=input()
l=[]
for i in s:l.append((123-ord(i))%26)
k=int(input())
for i,j in enumerate(l):
if j<=k:l[i],k=26,k-j
l[-1]=(l[-1]-k)+[0,26][l[-1]-k<1]
for i,j in enumerate(l):l[i]=chr(123-j)
print(''.join(map(str,l))) | Traceback (most recent call last):
File "/tmp/tmpduup7chp/tmpt1hxhpom.py", line 1, in <module>
s=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s550678278 | p03994 | u171366497 | 1555069688 | Python | Python (3.4.3) | py | Runtime Error | 80 | 3444 | 295 | alpha='abcdefghijklmnopqrstuvwxyz'
S=input()
K=int(input())
ans=''
for s in S:
idx=alpha.index(s)
if idx==0 or 26-idx>K:
ans+=s
continue
else:
K-=26-idx
ans+='a'
if K>0:
tar=ans[-1]
idx=alpha.index(tar)
ans=ans[:-1]+alpha[idx+K]
print(ans) | Traceback (most recent call last):
File "/tmp/tmplpv4etfj/tmp8alsddmp.py", line 2, in <module>
S=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s910045121 | p03994 | u572144347 | 1552476386 | Python | Python (3.4.3) | py | Runtime Error | 75 | 4212 | 257 | s=input()
K=int(input())
ans=[]
for c in s:
if c=="a":
ans.append(c)
continue
if ord("z")+1- ord(c)<=K:
K-=ord("z")+1-ord(c)
ans.append("a")
continue
ans.append(c)
if K:
ans[-1]=chr( ord(ans[-1])+K)
print("".join(ans)) | Traceback (most recent call last):
File "/tmp/tmpu3et7ow8/tmpvbgx89yv.py", line 1, in <module>
s=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s429391365 | p03994 | u075012704 | 1550098292 | Python | Python (3.4.3) | py | Runtime Error | 72 | 3696 | 353 | S = input()
K = int(input())
Costs = {chr(98 + i): (25 - i) for i in range(25)}
Costs['a'] = 0
ans = ""
for i in range(len(S) - 1):
s = S[i]
if K >= Costs[s]:
K -= Costs[s]
ans += 'a'
else:
ans += s
if K:
tail = ans[-1]
tail_ord = ord(tail)
ans = ans[:-1] + chr((tail... | Traceback (most recent call last):
File "/tmp/tmpkbn301yf/tmp35i3c9wk.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s876917657 | p03994 | u689562091 | 1549602683 | Python | Python (3.4.3) | py | Runtime Error | 60 | 4212 | 232 | S = input()
N = int(input())
newS = []
for s in S:
dis = 26 - (ord(s) - ord('a'))
if N >= dis:
newS.append('a')
N -= dis
else:
newS.append(s)
newS[-1] = chr(ord(newS[-1]) + N)
print(''.join(newS)) | Traceback (most recent call last):
File "/tmp/tmptfneyg34/tmpb00r4j3w.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s841253285 | p03994 | u689562091 | 1549602478 | Python | Python (3.4.3) | py | Runtime Error | 61 | 5616 | 219 | S = input()
N = int(input())
newS = []
for s in S:
dis = 26-(ord(s)-ord('a'))
if N >= dis:
newS.append('a')
N -= dis
else:
newS.append(s)
newS[-1] = chr(ord(newS[-1]) + N)
print(newS) | Traceback (most recent call last):
File "/tmp/tmptay4uyhq/tmpw46d606w.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s513014274 | p03994 | u698479721 | 1539109636 | Python | Python (3.4.3) | py | Runtime Error | 51 | 3572 | 526 | s = input()
K = int(input())
ans = ''
alphas = {'a':0,'b':25,'c':24,'d':23,'e':22,'f':21,'g':20,'h':19,'i':18,'j':17,'k':16,'l':15,'m':14,'n':13,'o':12,'p':11,'q':10,'r':9,'s':8,'t':7,'u':6,'v':5,'w':4,'x':3,'y':2,'z':1}
a = 'abcdefghijklmnopqrstuvwxyz'
dict1 = {}
dict2 = {}
i = 1
while i <= 26:
dict1[i] = a[i-1]
d... | Traceback (most recent call last):
File "/tmp/tmparyvjoul/tmp8geiwl45.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s272287775 | p03994 | u102126195 | 1536526942 | Python | Python (3.4.3) | py | Runtime Error | 162 | 5432 | 457 | def change(s):
if ord(s) != 122:
return chr(ord(s) + 1)
return "a"
s = list(input())
K = int(input())
i = 0
if len(s) > 1:
while True:
if i >= len(s):
break
if 122 - ord(s[i]) + 1 <= K:
K -= (122 - ord(s[i]) + 1)
s[i] = 'a'
i += 1
s[le... | Traceback (most recent call last):
File "/tmp/tmppqj0pj74/tmp87c3daky.py", line 5, in <module>
s = list(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s278911711 | p03994 | u631277801 | 1535916905 | Python | Python (3.4.3) | py | Runtime Error | 76 | 4212 | 637 | # 入力
import sys
stdin = sys.stdin
def li(): return [int(x) for x in stdin.readline().split()]
def li_(): return [int(x)-1 for x in stdin.readline().split()]
def lf(): return [float(x) for x in stdin.readline().split()]
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): retur... | Traceback (most recent call last):
File "/tmp/tmp_ayxgvx4/tmp0offjpt3.py", line 16, in <module>
k = ni()
^^^^
File "/tmp/tmp_ayxgvx4/tmp0offjpt3.py", line 11, in ni
def ni(): return int(ns())
^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s118908720 | p03994 | u075012704 | 1532893079 | Python | Python (3.4.3) | py | Runtime Error | 78 | 4212 | 254 | S = input()
K = int(input())
cost = [ord("z") - ord(s) + 1 for s in S]
ans = ""
for i in range(len(S)-1):
if cost[i] <= K:
K -= cost[i]
ans += "a"
else:
ans += S[i]
ans = ans[:-1] + chr(ord(ans[-1]) + K % 26)
print(ans)
| Traceback (most recent call last):
File "/tmp/tmp973c9slw/tmpdgvrcdkb.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s121478658 | p03994 | u075012704 | 1532892846 | Python | Python (3.4.3) | py | Runtime Error | 75 | 4212 | 247 | S = input()
K = int(input())
cost = [ord("z") - ord(s) + 1 for s in S]
ans = ""
for i in range(len(S)):
if cost[i] <= K:
K -= cost[i]
ans += "a"
else:
ans += S[i]
ans = ans[:-1] + chr(ord(ans[-1]) + K)
print(ans)
| Traceback (most recent call last):
File "/tmp/tmpvkbipnc_/tmppjj1bwx_.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s302317138 | p03994 | u828847847 | 1531889338 | Python | Python (2.7.6) | py | Runtime Error | 2104 | 3460 | 264 |
aord = ord("a")
s = list(raw_input())
k = int(input())
i = 0
while k > 0 and i < len(s):
if k >= ord('z') - ord(s[i]) + 1:
if s[i] == "a": continue
k -= ord('z') - ord(s[i]) + 1
s[i] = "a"
i += 1
s[len(s)-1] = chr(ord(s[len(s)-1]) + k)
print ''.join(s) | File "/tmp/tmpw1sge35s/tmpe789xihw.py", line 16
print ''.join(s)
^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s075292658 | p03994 | u828847847 | 1531888894 | Python | Python (2.7.6) | py | Runtime Error | 68 | 3588 | 235 |
aord = ord("a")
s = list(raw_input())
k = int(input())
i = 0
while k > 0 and i < len(s):
if k >= (aord + 26 - ord(s[i])):
k -= (aord + 26 - ord(s[i]))
s[i] = "a"
i += 1
s[len(s)-1] = chr(ord(s[len(s)-1]) + k)
print ''.join(s) | File "/tmp/tmpych19_r9/tmp5smz2yvu.py", line 15
print ''.join(s)
^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s596845250 | p03994 | u224983328 | 1531516988 | Python | Python (3.4.3) | py | Runtime Error | 188 | 4340 | 668 | s = input()
K = int(input())
sArr = list(s)
endpoint = len(sArr) - 1
result = ""
for i in range(len(sArr)):
if ord("z") - ord(sArr[i]) + 1 <= K:
K -= ord("z") - ord(sArr[i]) + 1
sArr[i] = "a"
while K > 0:
if ord("z") - ord(sArr[endpoint]) >= K:
sArr[endpoint] = chr(ord(sArr[endpoint])... | Traceback (most recent call last):
File "/tmp/tmpai0tycda/tmp8s9t4w1z.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s735459182 | p03994 | u224983328 | 1531516830 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 4212 | 658 | s = input()
K = int(input())
sArr = list(s)
endpoint = len(sArr) - 1
result = ""
for i in range(len(sArr)):
if ord("z") - ord(sArr[i]) + 1 <= K:
K -= ord("z") - ord(sArr[i]) + 1
sArr[i] = "a"
while K > 0:
if ord("z") - ord(sArr[endpoint]) >= K:
sArr[endpoint] = chr(ord(sArr[endpoint])... | Traceback (most recent call last):
File "/tmp/tmpvho5b3sn/tmpmbkvvlli.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s742482293 | p03994 | u224983328 | 1531515358 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 4340 | 632 | s = input()
K = int(input())
sArr = list(s)
endpoint = len(sArr) - 1
result = ""
for i in range(len(sArr)):
if ord("z") - ord(sArr[i]) + 1 <= K:
K -= ord("z") - ord(sArr[i]) + 1
sArr[i] = "a"
while K > 0:
if ord("z") - ord(sArr[endpoint]) >= K:
sArr[endpoint] = chr(ord(sArr[endpoint])... | Traceback (most recent call last):
File "/tmp/tmp0w51rcsi/tmp_s56xehl.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s917080874 | p03994 | u224983328 | 1531514744 | Python | Python (3.4.3) | py | Runtime Error | 215 | 4212 | 509 | s = input()
K = int(input())
sArr = list(s)
endpoint = len(sArr) - 1
result = ""
for i in range(len(sArr)):
if ord("z") - ord(sArr[i]) + 1 <= K:
K -= ord("z") - ord(sArr[i]) + 1
sArr[i] = "a"
while K > 0:
if ord("z") - ord(sArr[endpoint]) >= K:
sArr[endpoint] = chr(ord(sArr[endpoint])... | Traceback (most recent call last):
File "/tmp/tmpccan13nt/tmpngxp5yz5.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s414932737 | p03994 | u278479217 | 1530928532 | Python | PyPy3 (2.4.0) | py | Runtime Error | 167 | 38384 | 4 | jkl; | Traceback (most recent call last):
File "/tmp/tmp0lnhm8n2/tmpydah69zz.py", line 1, in <module>
jkl;
^^^
NameError: name 'jkl' is not defined
| |
s166772622 | p03994 | u278479217 | 1530928399 | Python | PyPy3 (2.4.0) | py | Runtime Error | 172 | 38640 | 4 | hoge | Traceback (most recent call last):
File "/tmp/tmp59k2mzoa/tmp__u4ym39.py", line 1, in <module>
hoge
NameError: name 'hoge' is not defined
| |
s757053300 | p03994 | u926678805 | 1520374270 | Python | Python (3.4.3) | py | Runtime Error | 196 | 5444 | 220 | # coding : utf-8
s=list(map(lambda c:ord(c)-ord('a'),input()))
k=int(input())
for i in range(len(s)):
if 26-s[i]<=k:
k-=(26-s[i])
s[i]=0
s[-1]+=k
for n in s:
print(chr(ord('a')+n),end='')
print()
| Traceback (most recent call last):
File "/tmp/tmp5eknvklr/tmpuusl27b4.py", line 2, in <module>
s=list(map(lambda c:ord(c)-ord('a'),input()))
^^^^^^^
EOFError: EOF when reading a line
| |
s619804292 | p03994 | u785205215 | 1508733293 | Python | Python (3.4.3) | py | Runtime Error | 89 | 11252 | 285 | s = input()
n = int(input())
t = []
a = []
for i in s:
ord_i = ord(i)
t.append((123 - ord_i, ord_i))
for i in t:
if n >= i[0]:
a.append(chr(97))
n -= i[0]
else:
a.append(chr(i[1]))
temp = ord(a[-1]) + n
a[-1] = chr(temp)
print(''.join(a)) | Traceback (most recent call last):
File "/tmp/tmpq4or6q0l/tmpp29mo239.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s895121838 | p03994 | u846552659 | 1507852454 | Python | Python (3.4.3) | py | Runtime Error | 67 | 4152 | 396 | # -*- coding:utf-8 -*-
s = list(input())
k = int(input())
for tmp in range(len(s)):
if k == 0:
break
a = 26-(ord(s[tmp]) - ord('a'))
if k >= a:
k -= a
s[tmp] = 'a'
else:
pass
if k > 0:
if ord('z') >= ord(s[len(s)-1])+k:
s[len(s)-1] = chr(ord(s[len(s)-1])+k)
... | Traceback (most recent call last):
File "/tmp/tmp16fnp_kn/tmp2fhqsb4a.py", line 2, in <module>
s = list(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s505689821 | p03994 | u846552659 | 1507851301 | Python | Python (3.4.3) | py | Runtime Error | 69 | 4156 | 409 | # -*- coding:utf-8 -*-
s = list(input())
k = int(input())
for tmp in range(len(s)):
if k == 0:
break
a = 26-(ord(s[tmp]) - ord('a'))
if k >= a:
k -= a
s[tmp] = 'a'
else:
pass
if k > 0:
if ord('z') >= ord(s[len(s)-1])+k:
s[len(s)-1] = chr(ord(s[len(s)-1])+k)
... | Traceback (most recent call last):
File "/tmp/tmpa6v5hz36/tmp2h5ob4s9.py", line 2, in <module>
s = list(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s070302070 | p03994 | u761320129 | 1505778278 | Python | Python (3.4.3) | py | Runtime Error | 55 | 4212 | 297 | S = input()
k = int(input())
goal = ord('z') + 1
ans = []
for c in S:
if c == 'a': continue
d = goal - ord(c)
if k >= d:
k -= d
ans.append('a')
else:
ans.append(c)
last = (k + ord(ans[-1]) - ord('a')) % 26
ans[-1] = chr(ord('a') + last)
print(''.join(ans))
| Traceback (most recent call last):
File "/tmp/tmph5ez6ro3/tmpfazfzujp.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s571806966 | p03994 | u024612773 | 1491590723 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 301 | s=list(input())
k=int(input())
for i in range(len(s)):
c = ord('z') - ord(s[i]) + 1
if c > k:
continue
else:
k -= c
s[i] = 'a'
if k > 0:
s[-1] = chr(ord('a') + ((ord(s[-1]) - ord('a') + k) % 26))
print(''.join(s)) | File "/tmp/tmpr4hvz02p/tmp5lb6idtg.py", line 1
s=list(input())
IndentationError: unexpected indent
| |
s826634476 | p03994 | u282609839 | 1480260581 | Python | Python (2.7.6) | py | Runtime Error | 17 | 2820 | 1307 | alphabet = "abcdefghijklmnopqrstuvwxyz"
my_listChar = []
def moveChar(inputchar):
index = alphabet.find(inputchar)
return alphabet[(index + 1) % 26]
def nextChar(inChar, maxNoOfConverted, inputString):
maxNum = int(maxNoOfConverted)
output = inChar
my_listChar.append(output)
for charInd in ran... | File "/tmp/tmpko7vt7pn/tmpgkyqd76e.py", line 37
print "===================================="
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s592138049 | p03994 | u282609839 | 1480260472 | Python | Python (2.7.6) | py | Runtime Error | 17 | 2820 | 1267 | my_listChar = []
def moveChar(inputchar):
index = alphabet.find(inputchar)
return alphabet[(index + 1) % 26]
def nextChar(inChar, maxNoOfConverted, inputString):
maxNum = int(maxNoOfConverted)
output = inChar
my_listChar.append(output)
for charInd in range(maxNum):
output = moveChar(ou... | File "/tmp/tmpru28ybdj/tmpfp6srvdl.py", line 36
print "===================================="
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s149283408 | p03994 | u619631862 | 1476148701 | Python | Python (3.4.3) | py | Runtime Error | 25 | 3064 | 243 | a=[ord(i) for i in input()]
s = int(input())
for i in range(len(a)):
if 26+97-a[i]<=s && a[i]!=97:
aa=a[i]
a[i]=97
s-=26+97-aa
if s>0:
a[-1]+=s
if a[-1]>97+25:
a[-1]=(a[-1]-97)%26+97
b=""
for i in a:
b+=chr(i)
print(b) | File "/tmp/tmpeieiq4vj/tmpu4wf6ktm.py", line 4
if 26+97-a[i]<=s && a[i]!=97:
^
SyntaxError: invalid syntax
| |
s877383120 | p03994 | u399243564 | 1475374676 | Python | Python (2.7.6) | py | Runtime Error | 32 | 4420 | 242 | s = raw_input()
N = int(raw_input())
dis = [ord('z')-ord(c) for c in s]
for idx, d in enumerate(dis[:-1]):
if d <= N:
s[idx] = 'a'
N -= d
if N > 0:
N %= 27
t = (dis[-1]-N) % 27
s[-1] = chr(ord('z') - t)
print s | File "/tmp/tmpigakef0d/tmpema6ctvu.py", line 12
print s
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s858663180 | p03994 | u399243564 | 1475374490 | Python | Python (2.7.6) | py | Runtime Error | 33 | 4332 | 234 | s = raw_input()
N = int(raw_input())
dis = [ord('z')-ord(c) for c in s]
for idx, d in enumerate(dis[:-1]):
if d <= N:
s[idx] = 'a'
N -= d
if N > 0:
N %= 27
t = (dis[-1]-N) % 27
s[-1] = chr(ord('z') - t) | Traceback (most recent call last):
File "/tmp/tmpfyb__dc2/tmpfpgjbfmb.py", line 1, in <module>
s = raw_input()
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s998602184 | p03994 | u664481257 | 1475113327 | Python | Python (3.4.3) | py | Runtime Error | 92 | 9304 | 1751 | # -*- coding: utf-8 -*-
# !/usr/bin/env python
# vim: set fileencoding=utf-8 :
"""
#
# Author: Noname
# URL: https://github.com/pettan0818
# License: MIT License
# Created: 2016-09-28
#
# Usage
#
"""
import sys
def input_single_line():
"""Receive Inputs."""
return input()
def input_two_line():
... | Traceback (most recent call last):
File "/tmp/tmpk717ygox/tmpvti9wvn_.py", line 85, in <module>
make_suzuki_process(inputted[0], inputted[1])
File "/tmp/tmpk717ygox/tmpvti9wvn_.py", line 70, in make_suzuki_process
if chance > 0:
^^^^^^^^^^
TypeError: '>' not supported between instances of 'str' and '... | |
s270304000 | p03994 | u155667931 | 1474864825 | Python | Python (2.7.6) | py | Runtime Error | 17 | 2696 | 706 | def decoder(str_int):
s_=''
for a in str_int:
s_ = s_+(alpbet[a])
return s_
s = raw_input()
K = input()
alpbet = 'abcdefghijklmnopqrstuvwxyz'
encoder = lambda s: [alpbet.index(a) for a in s]
inc_count = K
str_int = encoder(s)
for i in range(len(str_int)):
#末尾文字でない
if i != len(str_int)-1:
... | File "/tmp/tmpq6cugvfj/tmpc2r7nafp.py", line 27
print decoder(str_int)
^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s789746214 | p03994 | u921249617 | 1474774576 | Python | Python (3.4.3) | py | Runtime Error | 67 | 4152 | 269 | s = list(input())
K = int(input())
alphabet = "abcdefghijklmnopqrstuvwxyz"
for i in range(len(s)):
if K > 26 or s[i] >= alphabet[-K]:
K -= ord("z") - ord(s[i]) + 1
s[i] = "a"
if K > 0:
K %= 26
s[-1] = chr(ord(s[-1]) + K)
print("".join(s)) | Traceback (most recent call last):
File "/tmp/tmpj4f2e24w/tmpgkmooeda.py", line 1, in <module>
s = list(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s040490950 | p03994 | u989496399 | 1474773296 | Python | Python (2.7.6) | py | Runtime Error | 1555 | 3100 | 565 | s = raw_input()
k = int(raw_input())
s_l = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
def s_i(st):
return ord(st) - 96
j = 0
while k > 0:
a = s_i(s[j])
if s[j] == 'a' and j < len(s)-1:
pass
elif 27 - a <= k:
k = k - (27 -... | File "/tmp/tmp_rmalt5c/tmpmagc4lq_.py", line 29
print s
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s539989907 | p03994 | u153147777 | 1474773179 | Python | Python (2.7.6) | py | Runtime Error | 16 | 2696 | 501 | s = raw_input()
K = input()
base = ord('a')
result = ''
if len(s) == 1:
K = K % 26
print chr( base + (((ord(s[0]) - base) + K) % 26))
return
def willA(c, i):
a = 26 - (ord(c) - base)
if ord(c) - base + i >= 27:
return True, a
else:
return False,0
for i in xrange(len(s)... | File "/tmp/tmppc682tca/tmp0e3cb4u2.py", line 8
print chr( base + (((ord(s[0]) - base) + K) % 26))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s831722617 | p03994 | u989496399 | 1474772284 | Python | Python (2.7.6) | py | Runtime Error | 1764 | 3100 | 628 | s = raw_input()
k = float(raw_input())
s_l = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
def s_i(st):
for i in range(26):
if st == s_l[i]:
break
return i + 1
j = 0
while k > 0:
a = s_i(s[j])
if s[j] == 'a' and j < len(... | File "/tmp/tmptp7jisto/tmpjiwm92jm.py", line 32
print s
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s347793063 | p03994 | u989496399 | 1474772187 | Python | Python (2.7.6) | py | Runtime Error | 1663 | 3116 | 626 | s = raw_input()
k = int(raw_input())
s_l = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
def s_i(st):
for i in range(26):
if st == s_l[i]:
break
return i + 1
j = 0
while k > 0:
a = s_i(s[j])
if s[j] == 'a' and j < len(s)... | File "/tmp/tmpof7wtdw5/tmp9r03p83w.py", line 32
print s
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s704988444 | p03994 | u178407096 | 1474772119 | Python | Python (2.7.6) | py | Runtime Error | 16 | 2696 | 280 | #read in input
s = map((lambda x: ord(x) - 96), raw_input())
k = int(raw_input())
for i in range(len(s)):
sv = s[i]
if sv == 1 || (27 - sv) > k:
continue
s[i] = 1
k = k - (27 - sv)
s[-1] = (((s[-1] + k) - 1) % 26) + 1
print "".join(map((lambda x: chr(x + 96)), s)) | File "/tmp/tmpca7vm7et/tmpe9r8cddi.py", line 8
if sv == 1 || (27 - sv) > k:
^
SyntaxError: invalid syntax
| |
s993149896 | p03994 | u921249617 | 1474772071 | Python | Python (3.4.3) | py | Runtime Error | 67 | 4156 | 355 | s = list(input())
K = int(input())
alphabet = "abcdefghijklmnopqrstuvwxyz"
for i in range(len(s)):
if K >= 26 or s[i] >= alphabet[-K]:
K -= ord("z") - ord(s[i]) + 1
s[i] = "a"
if K > 0:
K %= 26
if (chr(ord(s[-1]) + K) <= "z"):
s[-1] = chr(ord(s[-1]) + K)
else:
s[-1] = c... | Traceback (most recent call last):
File "/tmp/tmp_qu358kl/tmp7bwo3vqc.py", line 1, in <module>
s = list(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s046968365 | p03994 | u989496399 | 1474771970 | Python | Python (2.7.6) | py | Runtime Error | 1689 | 3100 | 634 | s = raw_input()
k = int(raw_input())
s_l = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
def s_i(st):
for i in range(26):
if st == s_l[i]:
return i + 1
break
j = 0
while k > 0:
a = s_i(s[j])
if s[j] == 'a' and j ... | File "/tmp/tmp8dbbeduw/tmpy69exazk.py", line 32
print s
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s374411211 | p03994 | u989496399 | 1474771732 | Python | Python (2.7.6) | py | Runtime Error | 1762 | 3204 | 640 | s = raw_input()
k = int(raw_input())
s_l = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
def s_i(st):
for i in range(26):
if st == s_l[i]:
return i + 1
break
j = 0
while k > 0:
if s[j] == 'a' and j < len(s)-1:
... | File "/tmp/tmp5fadtt8u/tmpu9x2mso6.py", line 31
print s
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s354977898 | p03994 | u230180492 | 1474771589 | Python | Python (3.4.3) | py | Runtime Error | 23 | 3316 | 450 | s=input()
k=int(input())
d = dict()
for i in range(len(alphabet)):
d[alphabet[i]]=i
def f(s,k):
s = [s[i] for i in range(len(s))]
res = s
L = 0
for i in range(len(s)):
l = max(26 - d[s[i]],0)
if L + l < k:
res[i] = "a"
L += l
else:
if ... | Traceback (most recent call last):
File "/tmp/tmpt281r8hq/tmpdc7kz4m9.py", line 1, in <module>
s=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s740754812 | p03994 | u989496399 | 1474771515 | Python | Python (2.7.6) | py | Runtime Error | 1744 | 3100 | 640 | s = raw_input()
k = int(raw_input())
s_l = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
def s_i(st):
for i in range(26):
if st == s_l[i]:
return i + 1
break
j = 0
while k > 0:
if s[j] == 'a' and j < len(s)-1:
... | File "/tmp/tmp4y3vcuq7/tmpco4mt2lh.py", line 31
print s
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s967222648 | p03994 | u230180492 | 1474771514 | Python | Python (3.4.3) | py | Runtime Error | 23 | 3316 | 443 | s=input()
k=int(input())
d = dict()
for i in range(len(alphabet)):
d[alphabet[i]]=i
def f(s,k):
s = [s[i] for i in range(len(s))]
res = s
L = 0
for i in range(len(s)):
l = max(26 - d[s[i]],0)
if L + l < k:
res[i] = "a"
L += l
else:
if ... | Traceback (most recent call last):
File "/tmp/tmpb43wegtg/tmpbe2gz3od.py", line 1, in <module>
s=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s870227256 | p03994 | u436484848 | 1474771023 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3064 | 500 | #C-Next Letter
str = input()
K = int(input())
tempK = K
result = ""
for i in range(len(str)-1):
changeNum = 122-ord(str[i])+1
if (changeNum <= tempK):
result += "a"
tempK -= changeNum
if (tempK == 0):
result += str[i+:]
print(result)
break
else:
result += str[i]
tempK %= 26
if (tempK > 0):
changeNu... | File "/tmp/tmpdjsb4a1l/tmpz9n7t3bn.py", line 12
result += str[i+:]
^
SyntaxError: invalid syntax
| |
s692607215 | p03994 | u483182857 | 1474771006 | Python | Python (3.4.3) | py | Runtime Error | 24 | 3316 | 499 | s=input()
list=[]
flag=false
k=int(input())
for i in range(len(s)):
if (ord(s[i])+k)>122:
list.append('a')
k=k-(123-ord(s[i]))
else:
list.append(s[i])
flag=true
if flag==true:
for i in reversed(len(s)):
if list[i]!='a':
x=122-ord(s[i])
if x<=k:... | Traceback (most recent call last):
File "/tmp/tmpza__3cyb/tmp07lkx90j.py", line 1, in <module>
s=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s109924195 | p03994 | u921249617 | 1474770928 | Python | Python (3.4.3) | py | Runtime Error | 65 | 4152 | 347 | s = list(input())
K = int(input())
alphabet = "abcdefghijklmnopqrstuvwxyz"
# need = 0
# for i in range(len(s)):
# need += ord("z") - ord(s[i]) + 1
for i in range(len(s)):
if K >= 26 or s[i] >= alphabet[-K]:
K -= ord("z") - ord(s[i]) + 1
s[i] = "a"
if K > 0:
K %= 26
s[-1] = chr(ord(s[-... | Traceback (most recent call last):
File "/tmp/tmpn9eg7ggn/tmp0bqqwd2o.py", line 1, in <module>
s = list(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s601704779 | p03994 | u921249617 | 1474770576 | Python | Python (3.4.3) | py | Runtime Error | 97 | 4152 | 341 | s = list(input())
K = int(input())
alphabet = "abcdefghijklmnopqrstuvwxyz"
need = 0
for i in range(len(s)):
need += ord("z") - ord(s[i]) + 1
for i in range(len(s)):
if K >= 26 or s[i] >= alphabet[-K]:
K -= ord("z") - ord(s[i]) + 1
s[i] = "a"
if K > 0:
K %= 26
s[-1] = chr(ord(s[-1]) + ... | Traceback (most recent call last):
File "/tmp/tmpfx828dbb/tmpaptmp9nm.py", line 1, in <module>
s = list(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s006183212 | p03994 | u725662235 | 1474770154 | Python | Python (2.7.6) | py | Runtime Error | 179 | 101308 | 528 | s = raw_input()
k = input()
def solve(s, k, i):
if i == len(s)-1:
# print "equal"
t = ord(s[i])+k
if t > ord("z"):
t -= ord("a")
t %= (ord("z")-ord("a") + 1)
t += ord("a")
s = s[:i] + chr(t)
return s
# print s, k
elif s[i] != "... | File "/tmp/tmptwsldw8c/tmpmvhuqykz.py", line 22
print solve(s,k,0)
^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s105937496 | p03994 | u327848404 | 1474769968 | Python | Python (3.4.3) | py | Runtime Error | 23 | 3064 | 342 | s = raw_input()
K = input()
alpha = [chr(i) for i in range(97,97+26)]
for moji in range(1, len(s)+1):
if alpha.index(s[moji-1]) != 0:
if K >= 26-alpha.index(s[moji-1]):
K = K - (26-alpha.index(s[moji-1]))
s = s[:moji-1] + 'a' + s[moji:]
if K>0:
last_char = alpha[ alpha.index(s[-1]) + (K % 26) ]
s = s[:-1... | File "/tmp/tmpf6qoxurx/tmp07idsibq.py", line 16
print s
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s548581842 | p03994 | u422104747 | 1474769848 | Python | Python (3.4.3) | py | Runtime Error | 67 | 3520 | 498 | def f(s,K):
res=0
str=""
for i in range(len(s)):
if s[i]=="a":
str+="a"
res+=1
continue
if K>=123-ord(s[i]):
str+="a"
res+=1
K-=123-ord(s[i])
else:
break
if res==0:
skip=0
for skip in range(len(s)):
if K>=123-ord(s[skip]):
break
return s[:skip],s[skip:],K
return str,s[res:],... | Traceback (most recent call last):
File "/tmp/tmphqmxs02h/tmpa4vlkg9w.py", line 23, in <module>
ss=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s005151936 | p03994 | u921249617 | 1474769548 | Python | Python (3.4.3) | py | Runtime Error | 63 | 4084 | 257 | s = list(input())
K = int(input())
alphabet = "abcdefghijklmnopqrstuvwxyz"
for i in range(len(s)):
if K > 26 or s[i] >= alphabet[-K]:
K -= ord("z") - ord(s[i]) + 1
s[i] = "a"
if K > 0:
s[-1] = chr(ord(s[-1]) + K)
print("".join(s)) | Traceback (most recent call last):
File "/tmp/tmpxyctngp5/tmp6793q86s.py", line 1, in <module>
s = list(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s045744469 | p03994 | u164898518 | 1474769391 | Python | Python (2.7.6) | py | Runtime Error | 1548 | 11716 | 456 | s = raw_input()
K = int(raw_input())
_s, _K = s[:], K
a = "abcdefghijklmnopqrstuvwxyz"
ai = a.index("a")
zi = a.index("z")
si = [zi - a.index(c) + 1 if c != "a" else 0 for c in s]
def rotation_alphabet(s,i):
return
for i, (c, ci) in enumerate(zip(s, si)):
if K == 0:
break
if c == "a":
co... | Traceback (most recent call last):
File "/tmp/tmpwkre7k6g/tmp1gtlvj5v.py", line 1, in <module>
s = raw_input()
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s474316929 | p03994 | u422104747 | 1474769143 | Python | Python (3.4.3) | py | Runtime Error | 68 | 4084 | 468 | def f(s,K):
if len(s)==1:
K%=26
if ord(s[0])+K<123:
return chr(ord(s[0])+K)
else:
return chr(ord(s[0])+K-26)
res=0
for i in range(len(s)):
if s[i]=="a":
res+=1
continue
if K>=123-ord(s[i]):
res+=1
K-=123-ord(s[i])
else:
break
str=""
for i in range(res):
str+="a"
if res==0:
for... | Traceback (most recent call last):
File "/tmp/tmp2h0abmdn/tmppn7kkubs.py", line 27, in <module>
ss=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s487593693 | p03994 | u531436689 | 1474768888 | Python | Python (2.7.6) | py | Runtime Error | 16 | 2568 | 1562 | def num_to_char(s_num):
ch = []
for num in s_num:
ch.append(alphabet[(num%26)-1])
return ch
s = raw_input()
K = input()
alphabet = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
ans = []
s_num = []
for char in s:
s_num.append(alphabet... | File "/tmp/tmpmwnfac0i/tmpvtswyv41.py", line 15
s_num.append(alphabet.index(char) + 1)thon WS) -----------------------------
^
SyntaxError: unmatched ')'
| |
s741632715 | p03994 | u531436689 | 1474768888 | Python | Python (2.7.6) | py | Runtime Error | 17 | 2568 | 1562 | def num_to_char(s_num):
ch = []
for num in s_num:
ch.append(alphabet[(num%26)-1])
return ch
s = raw_input()
K = input()
alphabet = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
ans = []
s_num = []
for char in s:
s_num.append(alphabet... | File "/tmp/tmpd1wkkux2/tmpglm2cfyw.py", line 15
s_num.append(alphabet.index(char) + 1)thon WS) -----------------------------
^
SyntaxError: unmatched ')'
| |
s807804529 | p03994 | u725662235 | 1474768642 | Python | Python (2.7.6) | py | Runtime Error | 175 | 101404 | 555 | s = raw_input()
k = input()
def solve(s, k, i):
if i >= len(s):
# print "over"
return s
if i == len(s)-1:
# print "equal"
t = ord(s[i])+k
if t > ord("z"):
t -= ord("a")
t %= (ord("z")-ord("a") + 1)
t += ord("a")
s = s[:i] + chr... | File "/tmp/tmpl8rsxwoi/tmp_b1zm2dr.py", line 24
print solve(s,k,0)
^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s919000875 | p03994 | u657357805 | 1474768348 | Python | Python (3.4.3) | py | Runtime Error | 117 | 4156 | 413 | s=list(input())
k=int(input())
def toA(char):
return (ord('z')-ord(char)+1)%26
def toC(char,k):
if(ord('z')-ord(char)>=k):
return chr(ord(char)+k)
else:
return chr(ord('a')+k-ord('z')-ord(char))
for i in range(len(s)):
if(k==0):
break
if(k>=toA(s[i])):
k-=toA(s[i... | Traceback (most recent call last):
File "/tmp/tmpftq5bi6y/tmpqbgxyc3w.py", line 1, in <module>
s=list(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s366091916 | p03994 | u725662235 | 1474767688 | Python | Python (2.7.6) | py | Runtime Error | 175 | 101404 | 503 | s = raw_input()
k = input()
def solve(s, k, i):
if i >= len(s):
# print "over"
return s
if i == len(s)-1:
# print "equal"
t = ord(s[i])+k
if t > ord("z"):
t -= (ord("z") - ord("a")+1)
s = s[:i] + chr(t)
# print s, k
elif ord(s[i]) + k > or... | File "/tmp/tmpis0zglu4/tmpkdxfi23m.py", line 22
print solve(s,k,0)
^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s127337037 | p03994 | u414809621 | 1474766891 | Python | Python (3.4.3) | py | Runtime Error | 226 | 101084 | 271 | def move(s, k):
if len(s) == 1:
return chr(97+(ord(s) + k - 97)%26)
if s[0] == 'a' or 123-ord(s[0]) > k:
return s[0] + move(s[1:], k)
else:
return 'a' + move(s[1:], k-(123-ord(s[0])))
s = input()
K = int(input())
print(move(s,K)) | Traceback (most recent call last):
File "/tmp/tmp_i19haiq/tmpgwgh18k8.py", line 14, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s253305062 | p03994 | u471797506 | 1474765927 | Python | Python (2.7.6) | py | Runtime Error | 207 | 5156 | 458 | # -*- coding: utf-8 -*-
import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll
alpha = "abcdefghijklmnopqrstuvwxyz"
s = raw_input()
K = int(raw_input())
dic = dict([alpha[i], i] for i in xrange(len(alpha)))
ans = []
for si in s:
d = 26 - dic[si] if si != "a" else 0
if d <= K:
... | File "/tmp/tmp4xyjt1vp/tmpao61tii0.py", line 22
print "".join(ans)
^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s089604663 | p03995 | u535803878 | 1598595724 | Python | PyPy3 (7.3.0) | py | Runtime Error | 348 | 107804 | 1540 | import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")
h,w = list(map(int, input().split()))
n = int(input())
from collections import defaultdict
mind = [10**15] * h
dw = defaultdict(list)
for i in range(n):
r,c,a = map(int, inp... | Traceback (most recent call last):
File "/tmp/tmphxgisobh/tmp5dsmza3_.py", line 7, in <module>
h,w = list(map(int, input().split()))
^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s958549061 | p03995 | u535803878 | 1598595577 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2208 | 106680 | 1547 | import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")
h,w = list(map(int, input().split()))
n = int(input())
from collections import defaultdict
mind = [10**15] * h
dw = defaultdict(list)
for i in range(n):
r,c,a = map(int, inp... | Traceback (most recent call last):
File "/tmp/tmpf7wo9ln_/tmp66k0to2f.py", line 7, in <module>
h,w = list(map(int, input().split()))
^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s644313190 | p03995 | u535803878 | 1598595014 | Python | PyPy3 (7.3.0) | py | Runtime Error | 301 | 106308 | 1404 | import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")
h,w = list(map(int, input().split()))
n = int(input())
from collections import defaultdict
mind = [10**18] * h
dw = defaultdict(list)
for i in range(n):
r,c,a = map(int, in... | Traceback (most recent call last):
File "/tmp/tmppsftotvy/tmp9zstggnl.py", line 8, in <module>
h,w = list(map(int, input().split()))
^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s699922337 | p03995 | u535803878 | 1598594778 | Python | PyPy3 (7.3.0) | py | Runtime Error | 88 | 74776 | 1543 | import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")
# ファイル読み込み
def _input():
lines = open("../tmp_in").readlines()
for ss in lines:
yield ss.rstrip()
input = _input().__next__
h,w = list(map(int, input().split())... | Traceback (most recent call last):
File "/tmp/tmpzs33cts7/tmpiumlk61a.py", line 14, in <module>
h,w = list(map(int, input().split()))
^^^^^^^
File "/tmp/tmpzs33cts7/tmpiumlk61a.py", line 9, in _input
lines = open("../tmp_in").readlines()
^^^^^^^^^^^^^^^^^
FileNotFoundErro... | |
s382354799 | p03995 | u002023395 | 1583281784 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 1335 | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
bool solve(int R, int C){
vector<vector<pair<int, int>>> gr(R), gc(C);
int N; cin >> N;
for(int i=0;i<N;i++){
int r, c, a; cin >> r >> c >> a;
gr[r-1].emplace_back(c-1, a);
gc[c-1].emplace_back(r-1, a);
... | File "/tmp/tmpmypr094r/tmpg_4ye7m3.py", line 5
using namespace std;
^^^^^^^^^
SyntaxError: invalid syntax
| |
s791816398 | p03995 | u467736898 | 1573265914 | Python | Python (3.4.3) | py | Runtime Error | 766 | 40552 | 3080 | class WeightedUnionFind:
# https://qiita.com/drken/items/cce6fc5c579051e64fab
def __init__(self, n, SUM_UNITY=0):
self.par = list(range(n))
self.rank = [0] * n
self.diff_weight = [SUM_UNITY] * n
def root(self, x):
p = self.par[x]
if p == x:
return x
... | Traceback (most recent call last):
File "/tmp/tmp7vlsyo7i/tmps2u77adt.py", line 108, in <module>
main()
File "/tmp/tmp7vlsyo7i/tmps2u77adt.py", line 58, in main
R, C = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s085859168 | p03995 | u467736898 | 1573265723 | Python | Python (3.4.3) | py | Runtime Error | 1157 | 96868 | 3081 | class WeightedUnionFind:
# https://qiita.com/drken/items/cce6fc5c579051e64fab
def __init__(self, n, SUM_UNITY=0):
self.par = list(range(n))
self.rank = [0] * n
self.diff_weight = [SUM_UNITY] * n
def root(self, x):
p = self.par[x]
if p == x:
return x
... | Traceback (most recent call last):
File "/tmp/tmpkaek0j2r/tmpigcgvlv_.py", line 109, in <module>
main()
File "/tmp/tmpkaek0j2r/tmpigcgvlv_.py", line 58, in main
R, C = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s485483337 | p03995 | u436484848 | 1475627280 | Python | Python (3.4.3) | py | Runtime Error | 1808 | 106272 | 906 | from collections import defaultdict
def ReadInput():
return [int(i) for i in input().split(" ")]
(R, C) = ReadInput()
N = int(input())
VectorSet = set()
Grid = defaultdict(list)
for i in range(N):
(r, c, a) = ReadInput()
Grid[("R", r)].append((("C", c), a))
Grid[("C", c)].append((("R", r), a))
VectorSet.add(("R",... | Traceback (most recent call last):
File "/tmp/tmp0z72j1h_/tmpogmnyezj.py", line 4, in <module>
(R, C) = ReadInput()
^^^^^^^^^^^
File "/tmp/tmp0z72j1h_/tmpogmnyezj.py", line 3, in ReadInput
return [int(i) for i in input().split(" ")]
^^^^^^^
EOFError: EOF when reading... | |
s477830885 | p03995 | u107077660 | 1475596652 | Python | Python (3.4.3) | py | Runtime Error | 24 | 3064 | 621 | import sys
sys.setrecursionlimit(10**6)
R, C = map(int, input().split())
N = int(input())
r = []
c = []
a = []
for i in range(N):
ri, ci, ai = map(int, input().split())
r.append(ri)
c.append(ci)
a.append(ai)
x = {}
y = {}
for i in range(N):
if r[i] in x:
if c[i] in y:
if x[r[i]] + y... | File "/tmp/tmpsng0uttr/tmphcbird_v.py", line 11
r.append(ri)
TabError: inconsistent use of tabs and spaces in indentation
| |
s385971670 | p03995 | u436484848 | 1475297643 | Python | PyPy3 (2.4.0) | py | Runtime Error | 1258 | 141016 | 1001 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# D-Grid and Integers
from collections import defaultdict
def ReadInput():
return [int(i) for i in input().split(" ")]
(R, C) = ReadInput()
N = int(input())
VectorSet = set()
Grid = defaultdict(list)
for i in range(N):
(r, c, a) = ReadInput()
Grid[("R", r)].append((... | /tmp/tmpu73v6wtr/tmp81213zdr.py:33: SyntaxWarning: "is not" with a literal. Did you mean "!="?
while(len(VectorSet) is not 0):
/tmp/tmpu73v6wtr/tmp81213zdr.py:38: SyntaxWarning: "is" with a literal. Did you mean "=="?
minR = min(a for (p, a) in VectorCover.items() if (p[0] is "R"))
/tmp/tmpu73v6wtr/tmp81213zdr.py:3... | |
s065960158 | p03995 | u436484848 | 1475137667 | Python | Python (3.4.3) | py | Runtime Error | 23 | 3064 | 1143 | from collections import defaultdict
import copy
def readInput():
return [int(i) for i in input().split(" ")]
(R, C) = readInput()
N = int(input())
rowIdx = set()
cover = set()
grid = defaultdict(lambda:None)
rowGrid = defaultdict(set)
for i in range(N):
(r, c, a) = readInput()
r -= 1
c -= 1
rowGrid[r].add(c)
g... | File "/tmp/tmp9xn9ihiw/tmp3jitjpqy.py", line 32
if (grid[(j, k)] is now None):
^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?
| |
s926518204 | p03995 | u436484848 | 1475134690 | Python | Python (3.4.3) | py | Runtime Error | 784 | 58116 | 979 | from collections import defaultdict
def readInput():
return [int(i) for i in input().split(" ")]
(R, C) = readInput()
N = int(input())
rowIdx = set()
grid = defaultdict(lambda:None)
rowGrid = defaultdict(set)
for i in range(N):
(r, c, a) = readInput()
r -= 1
c -= 1
rowGrid[r].add(c)
grid[(r, c)] = a
rowIdx.a... | /tmp/tmph3ojecnj/tmp04kydftu.py:30: SyntaxWarning: "is" with a literal. Did you mean "=="?
if (mark is 1):
Traceback (most recent call last):
File "/tmp/tmph3ojecnj/tmp04kydftu.py", line 6, in <module>
(R, C) = readInput()
^^^^^^^^^^^
File "/tmp/tmph3ojecnj/tmp04kydftu.py", line 4, in readInput
... | |
s664977666 | p03995 | u436484848 | 1475132166 | Python | PyPy3 (2.4.0) | py | Runtime Error | 926 | 86360 | 1071 | #/usr/bin/env python3
# -*- coding: utf-8 -*-
# D-Grid and Integers
from collections import defaultdict
def readInput():
return [int(i) for i in input().split(" ")]
(R, C) = readInput()
N = int(input())
rowIdx = list()
colIdx = list()
grid = defaultdict(lambda:None)
rowGrid = defaultdict(list)
for i in range(N):
... | Traceback (most recent call last):
File "/tmp/tmp71mg5gjg/tmphefq_x1r.py", line 10, in <module>
(R, C) = readInput()
^^^^^^^^^^^
File "/tmp/tmp71mg5gjg/tmphefq_x1r.py", line 8, in readInput
return [int(i) for i in input().split(" ")]
^^^^^^^
EOFError: EOF when readin... | |
s184308316 | p03995 | u104282757 | 1474946828 | Python | Python (2.7.6) | py | Runtime Error | 17 | 2696 | 1438 | import numpy as np
R, C = map(int, raw_input().split())
N = int(raw_input())
rca_list = []
for i in range(N):
rca_list.append(map(int, raw_input().split()))
# ret
ret = "YES"
while len(rca_list) > 0 and ret == "YES":
#
r_vec = np.zeros(R)
r_vec_2 = np.zeros(R)
c_vec = np.zeros(C)
... | File "/tmp/tmpakg_g0gl/tmps7c783us.py", line 36
for i in range(len(rca_list)-1, , -1):
^
SyntaxError: invalid syntax
| |
s538985694 | p03995 | u104282757 | 1474936127 | Python | Python (2.7.6) | py | Runtime Error | 18 | 2696 | 1453 | r_vec = np.zeros(R)
r_vec_2 = np.zeros(R)
c_vec = np.zeros(C)
c_vec_2 = np.zeros(C)
# ret
ret = "YES"
while len(rca_list) > 0 and ret == "YES":
# first square
r, c, a = rca_list.pop()
r_vec[r-1] = a
c_vec[c-1] = 0
r_vec_2[r-1] = 1
c_vec_2[c-1] = 1
go_flg = "YES"
print r_vec, r_vec_2... | File "/tmp/tmpg0dp96w0/tmpcqk1htel.py", line 20
print r_vec, r_vec_2, c_vec, c_vec_2, go_flg, ret
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s097747193 | p03995 | u226155577 | 1474936073 | Python | Python (2.7.6) | py | Runtime Error | 1843 | 126896 | 1873 | from collections import deque
r, c = map(int, raw_input().split())
n = input()
P = [map(int, raw_input().split()) for i in xrange(n)]
d = {}
P.sort()
for i in xrange(1, n):
r1, c1, a1 = P[i-1]
r2, c2, a2 = P[i]
if r1 == r2:
d.setdefault((r1, c1), []).append(((r2, c2), a2-a1))
d.setdefault((... | File "/tmp/tmpy063wgtz/tmp76qj4kip.py", line 14
P.sort(key=lambda (r,c,a): (c,r))
^^^^^^^
SyntaxError: Lambda expression parameters cannot be parenthesized
| |
s395001953 | p03995 | u165551604 | 1474875650 | Python | Python (2.7.6) | py | Runtime Error | 16 | 2568 | 23 | import z3
print "Yes\n" | File "/tmp/tmpdlg9rzpr/tmpy67dg3n0.py", line 2
print "Yes\n"
^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s242905752 | p03995 | u478870821 | 1474774084 | Python | Python (3.4.3) | py | Runtime Error | 1847 | 119180 | 902 | from sys import exit, setrecursionlimit
from functools import reduce
from itertools import *
from collections import defaultdict
def read():
return int(input())
def reads():
return [int(x) for x in input().split()]
setrecursionlimit(10000)
(R, C) = reads()
N = read()
d = defaultdict(list)
V = set()
for _ in r... | Traceback (most recent call last):
File "/tmp/tmpmwabonr3/tmpd_3hkfl9.py", line 14, in <module>
(R, C) = reads()
^^^^^^^
File "/tmp/tmpmwabonr3/tmpd_3hkfl9.py", line 10, in reads
return [int(x) for x in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s135281896 | p03995 | u112686013 | 1474772002 | Python | Python (2.7.6) | py | Runtime Error | 16 | 2568 | 2631 | def check_squares(grid, coord, isFilled):
rows, cols = len(grid), len(grid[0])
r, c = coord[0], coord[1]
sums = []
if r - 1 >= 0 and c - 1 >= 0: # check upper left square
if isFilled and (grid[r][c - 1] + grid[r - 1][c] != grid[r][c] + grid[r - 1][c - 1]):
raise ValueError('not fill... | File "/tmp/tmpu1bliqx8/tmprkqxdlgv.py", line 10
elif not isFilled and if grid[r][c - 1] is not None and grid[r - 1][c] is not None and grid[r - 1][c - 1] is not None:
^^
SyntaxError: invalid syntax
| |
s877341454 | p03995 | u112686013 | 1474771789 | Python | Python (2.7.6) | py | Runtime Error | 16 | 2568 | 2578 | def check_squares(grid, coord, isFilled):
rows, cols = len(grid), len(grid[0])
r, c = coord[0], coord[1]
sums = []
if r - 1 >= 0 and c - 1 >= 0: # check upper left square
if isFilled and (grid[r][c - 1] + grid[r - 1][c] != grid[r][c] + grid[r - 1][c - 1]):
raise ValueError('not fill... | File "/tmp/tmp_z1_cs3m/tmp8f1vteks.py", line 10
elif not isFilled and if grid[r][c - 1] is not None and grid[r - 1][c] is not None and grid[r - 1][c - 1] is not None:
^^
SyntaxError: invalid syntax
| |
s001853994 | p03995 | u483182857 | 1474771620 | Python | Python (3.4.3) | py | Runtime Error | 23 | 3064 | 170 | c,r = map(int, input().split())
N=int(input())
list=[[-1] * r for i in range(c)]
for i in range(N):
i1,i1,x=map(int, input().split()))
list[i1][i2]=x
print('Yes') | File "/tmp/tmp0de3ntbh/tmp6y4cziu2.py", line 5
i1,i1,x=map(int, input().split()))
^
SyntaxError: unmatched ')'
| |
s761578580 | p03995 | u531436689 | 1474771214 | Python | Python (2.7.6) | py | Runtime Error | 16 | 2696 | 743 | def checker(board):
#for (upper,under) in zip(board[0],board[1])
upper = board[0]
under = board[1]
numlist = []
for i in range(len(upper)-2):
try:
tmp = upper[i] + under[i+1]
numlist.append(tmp)
tmp2 = upper[i+1] + under[i]
numlist.append(tmp2)... | File "/tmp/tmpfpomzg0h/tmprqhk88hp.py", line 17
elif:
^
SyntaxError: invalid syntax
| |
s367562602 | p03995 | u531436689 | 1474771136 | Python | Python (2.7.6) | py | Runtime Error | 16 | 2568 | 718 | def checker(board):
#for (upper,under) in zip(board[0],board[1])
upper = board[0]
under = board[1]
numlist = []
for i in range(len(upper)-2):
try:
tmp = upper[i] + under[i+1]
numlist.append(tmp)
tmp2 = upper[i+1] + under[i]
numlist.append(tmp2)... | File "/tmp/tmpa7ppl9qr/tmpxy1xp0u5.py", line 17
elif:
^
SyntaxError: invalid syntax
| |
s663912549 | p03996 | u368780724 | 1590107787 | Python | PyPy3 (2.4.0) | py | Runtime Error | 267 | 79316 | 1107 | import sys
from itertools import product
readline = sys.stdin.readline
def check1(A):
K = max(A)
table = [-1]*(K+1)
for i in range(Q):
table[A[i]] = i
if -1 in table:
return False
if any(t1-t2 < 0 for t1, t2 in zip(table, table[1:])):
return False
return True
INF =... | Traceback (most recent call last):
File "/tmp/tmprxwqvimc/tmp71v5oqgk.py", line 43, in <module>
N, M = map(int, readline().split())
^^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s297598441 | p03996 | u436484848 | 1475626331 | Python | Python (3.4.3) | py | Runtime Error | 71 | 14468 | 668 | def reads(offset = 0):
return [int(i) - offset for i in input().split(' ')]
def Judge(vector):
length = len(vector)-1
for i in range(length):
if(vector[i] > vector[i+1]):
return 0
return 1
(N, M) = reads()
Q = int(input())
A = reads(1)
pos = [-1] * M
pat = []
freq = [0] * (M+1)
freq[0] = N
found = set()
for ... | Traceback (most recent call last):
File "/tmp/tmp1u235zvi/tmpyf2q5oqi.py", line 9, in <module>
(N, M) = reads()
^^^^^^^
File "/tmp/tmp1u235zvi/tmpyf2q5oqi.py", line 2, in reads
return [int(i) - offset for i in input().split(' ')]
^^^^^^^
EOFError: EOF when r... | |
s689787891 | p03996 | u436484848 | 1475389306 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3064 | 862 | from collections import defaultdict
def ReadInput():
return [int(a) for a in input().split(' ')]
(N, M) = ReadInput()
Q = int(input())
Array = ReadInput()
def ifEqual(x):
temp = None
for i in x:
if (temp == None):
temp = x[i]
continue
elif (x[i] != temp):
print('ifEqual is 0')
return 0
return temp
... | File "/tmp/tmp0xjx91xn/tmpa0nuk0c5.py", line 40
else
^
SyntaxError: expected ':'
| |
s658975282 | p03996 | u945080461 | 1474769707 | Python | Python (2.7.6) | py | Runtime Error | 158 | 23220 | 877 | from sys import stdin
from itertools import repeat
def main():
n, m = map(int, stdin.readline().split())
q = int(stdin.readline())
a = map(int, stdin.readline().split(), repeat(10, q))
a = [x - 1 for x in a]
l = [[] for i in xrange(q)]
la = []
for i in xrange(q - 1, -1, -1):
x = a[i]... | File "/tmp/tmp1_0ynnce/tmp56kr0uw2.py", line 32
print "No"
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s572427272 | p03997 | u185948224 | 1601346848 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9000 | 59 | a, b, h = map(int, input().split())
print((a + b) * h // 2) | Traceback (most recent call last):
File "/tmp/tmpog2coway/tmp5ktryba8.py", line 1, in <module>
a, b, h = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s280021849 | p03997 | u318661636 | 1601295566 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9036 | 53 | a,b,h = map(int,input().split())
print(((a+b)*h)//2) | Traceback (most recent call last):
File "/tmp/tmp51hdg6p6/tmpmlp3nu3t.py", line 1, in <module>
a,b,h = 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.