ZhenlongDai/ACPR huggingface dataset:
Problem: p02817
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
S,T = input().split()
print(S+T)

Failing test case input:
cqho ]sb

Expected output:
]sbcqho


Actual output:
cqho]sb


Fixed submission (verdict: Accepted):
S,T = input().split()
print(T+S)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print("".join(input().split()))


Failing test case input:
tkve tglu

Expected output:
tglutkve


Actual output:
tkvetglu


Fixed submission (verdict: Accepted):
print("".join(input().split()[::-1]))

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S, T = input().split()

print(S + T)

Failing test case input:
redo bat

Expected output:
batredo


Actual output:
redobat


Fixed submission (verdict: Accepted):
S, T = input().split()

print(T + S)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
ST = input().split()
s = ""
s += ST[0]
s += ST[1]
print(s)

Failing test case input:
qcfq sc_

Expected output:
sc_qcfq


Actual output:
qcfqsc_


Fixed submission (verdict: Accepted):
ST = input().split()
s = ""
s += ST[1]
s += ST[0]
print(s)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = input().split(" ")
a += b
print(a)

Failing test case input:
tkve tglu

Expected output:
tglutkve


Actual output:
tkvetglu


Fixed submission (verdict: Accepted):
a, b = input().split(" ")
b += a
print(b)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S,T=input().split()
print(S+T)


Failing test case input:
sltf ltgu

Expected output:
ltgusltf


Actual output:
sltfltgu


Fixed submission (verdict: Accepted):
S,T=input().split()
print(T+S)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = map(str, input().split())

print(s+t)

Failing test case input:
cgqp ]cs

Expected output:
]cscgqp


Actual output:
cgqp]cs


Fixed submission (verdict: Accepted):
s, t = map(str, input().split())
 
print(t+s)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
C  = input()
A , B = C.split()
print(A+B)

Failing test case input:
eqdo s`b

Expected output:
s`beqdo


Actual output:
eqdos`b


Fixed submission (verdict: Accepted):
C  = input()
A , B = C.split()
print(B+A)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(input().split())

sort_a = sorted(a)

print(''.join(sort_a))



Failing test case input:
kfut uufm

Expected output:
uufmkfut


Actual output:
kfutuufm


Fixed submission (verdict: Accepted):
a = list(input().split())

a = a[::-1]



print(''.join(a))

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S, T = map(str, input().split())

ans = S + T

print(ans)

Failing test case input:
etlu tglu

Expected output:
tgluetlu


Actual output:
etlutglu


Fixed submission (verdict: Accepted):
S, T = map(str, input().split())

ans = T + S

print(ans)
Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


S, T = map(str,input().split())
print(S+T)


Failing test case input:
cqho ]sb

Expected output:
]sbcqho


Actual output:
cqho]sb


Fixed submission (verdict: Accepted):


S, T = map(str,input().split())
print(T+S)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t=list(map(str,input().split()))
print(s+t)


Failing test case input:
odqf s_b

Expected output:
s_bodqf


Actual output:
odqfs_b


Fixed submission (verdict: Accepted):
s,t=list(map(str,input().split()))
print(t+s)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
if __name__ == '__main__':
    a, b = input().split(' ')
    print(a+b)

Failing test case input:
cqoh ]sc

Expected output:
]sccqoh


Actual output:
cqoh]sc


Fixed submission (verdict: Accepted):
if __name__ == '__main__':
    a, b = input().split(' ')
    print(b+a)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print(''.join(input().split()))

Failing test case input:
pqfc sc]

Expected output:
sc]pqfc


Actual output:
pqfcsc]


Fixed submission (verdict: Accepted):
print(''.join(list(input().split()[::-1])))

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = input().split()
print(a+b)

Failing test case input:
odqf b_r

Expected output:
b_rodqf


Actual output:
odqfb_r


Fixed submission (verdict: Accepted):
a, b = input().split()
print(b+a)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

s, t = input().split()
res = s + t
print(res)

Failing test case input:
gums luhu

Expected output:
luhugums


Actual output:
gumsluhu


Fixed submission (verdict: Accepted):

s, t = input().split()
res = t + s
print(res)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S,T=input().split()
print(S+T)

Failing test case input:
redo bta

Expected output:
btaredo


Actual output:
redobta


Fixed submission (verdict: Accepted):
S,T=input().split()
print(T+S)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t = input("S T").split()
print(t + s)

Failing test case input:
qcfq sc^

Expected output:
sc^qcfq


Actual output:
S Tsc^qcfq


Fixed submission (verdict: Accepted):
s,t = input().split()
print(t + s)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(str,input().split())
print(a+b)

Failing test case input:
tfuk muuf

Expected output:
muuftfuk


Actual output:
tfukmuuf


Fixed submission (verdict: Accepted):
a,b=map(str,input().split())
print(b+a)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S,T=input().split(" ")
print(S+T)

Failing test case input:
cgqp ]ct

Expected output:
]ctcgqp


Actual output:
cgqp]ct


Fixed submission (verdict: Accepted):
S,T=input().split(" ")
print(T+S)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = input().split()
print(s + t)

Failing test case input:
tkue fult

Expected output:
fulttkue


Actual output:
tkuefult


Fixed submission (verdict: Accepted):
s, t = input().split()
print(t + s)
Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = input().split()
print(s,t,sep='')

Failing test case input:
ohqc ]sc

Expected output:
]scohqc


Actual output:
ohqc]sc


Fixed submission (verdict: Accepted):
s, t = input().split()
print(t,s,sep='')

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S,D= map(str,input().split())
print(S+D)

Failing test case input:
kftu uumf

Expected output:
uumfkftu


Actual output:
kftuuumf


Fixed submission (verdict: Accepted):
S,D= map(str,input().split())
print(D+S)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
ST = input("").split()
S, T = ST[0], ST[1]
print("{}".format(S + T))

Failing test case input:
kfst fmuu

Expected output:
fmuukfst


Actual output:
kfstfmuu


Fixed submission (verdict: Accepted):
ST = input("").split()
S, T = ST[0], ST[1]
print("{}".format(T + S))

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def string(s, t):
	summ1 = 0
	summ2 = 0
	for i in range(len(s)):
		summ1 += ord(s[i])
	for j in range(len(t)):
		summ2 += ord(t[j])
	if summ1 > summ2:
		print(t, end="")
		print(s)
	else:
		print(s, end="")
		print(t)


s, t = map(str, input().split())
string(s, t)

Failing test case input:
gums lugu

Expected output:
lugugums


Actual output:
gumslugu


Fixed submission (verdict: Accepted):
def string(s, t):
	summ1 = 0
	summ2 = 0
	for i in range(len(s)):
		summ1 += ord(s[i])
	for j in range(len(t)):
		summ2 += ord(t[j])
	if summ1 > summ2:
		print(t, end="")
		print(s)
	else:
		print(t, end="")
		print(s)


s, t = map(str, input().split())
string(s, t)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t = input().split()

print(s+t)


Failing test case input:
ocfq c_r

Expected output:
c_rocfq


Actual output:
ocfqc_r


Fixed submission (verdict: Accepted):
s,t = input().split()
ans = t+s

print(ans)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S,T = input().split()
str=S+T

print(str)


Failing test case input:
qcfq sc_

Expected output:
sc_qcfq


Actual output:
qcfqsc_


Fixed submission (verdict: Accepted):
S,T = input().split()
str=T+S

print(str)

Problem: p02817
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
S,T = map(str,input().split())
print(S+T)

Failing test case input:
tkue fulu

Expected output:
fulutkue


Actual output:
tkuefulu


Fixed submission (verdict: Accepted):
S,T = map(str,input().split())
print(T+S)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t=map(str,input().split())
print(s+t)

Failing test case input:
odqf s`b

Expected output:
s`bodqf


Actual output:
odqfs`b


Fixed submission (verdict: Accepted):
左,右=map(str,input().split())
print(右+左)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
str = input().split()

print(str[0]+str[1], sep="")

Failing test case input:
smuf lugu

Expected output:
lugusmuf


Actual output:
smuflugu


Fixed submission (verdict: Accepted):
str = input().split()
 
print(str[1]+str[0], sep="")
Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = input().split()
print(a+b)

Failing test case input:
redo b`t

Expected output:
b`tredo


Actual output:
redob`t


Fixed submission (verdict: Accepted):
a,b = input().split()
print(b+a)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = input().split()
print(s+t)


Failing test case input:
pdfq b_r

Expected output:
b_rpdfq


Actual output:
pdfqb_r


Fixed submission (verdict: Accepted):
s, t = input().split()
print(t+s)

Problem: p02817
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input().split()
print("".join(s))


Failing test case input:
qedo b`s

Expected output:
b`sqedo


Actual output:
qedob`s


Fixed submission (verdict: Accepted):
s,t = input().split()
print(t+s)

Problem: p02817
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
s,t = input().split()
print(s + t)

Failing test case input:
kfut mfuu

Expected output:
mfuukfut


Actual output:
kfutmfuu


Fixed submission (verdict: Accepted):
s,t = input().split()
print(t + s)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,k=map(str,input().split())
print(n,end="")
print(k)


Failing test case input:
odqf s`b

Expected output:
s`bodqf


Actual output:
odqfs`b


Fixed submission (verdict: Accepted):
n,k=map(str,input().split())
print(k,end="")
print(n)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t = map(str, input().split())
print(s+t)

Failing test case input:
sltf ulth

Expected output:
ulthsltf


Actual output:
sltfulth


Fixed submission (verdict: Accepted):
s,t = map(str, input().split())
print(t+s)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S,T=input().split()
print(S+T)

Failing test case input:
redp atb

Expected output:
atbredp


Actual output:
redpatb


Fixed submission (verdict: Accepted):
S,T=input().split()
print(T+S)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a , b =map(str,input().split())
ans = a + b
print(ans)

Failing test case input:
ocfq _sc

Expected output:
_scocfq


Actual output:
ocfq_sc


Fixed submission (verdict: Accepted):
a , b =map(str,input().split())
ans = b + a
print(ans)

Problem: p02817
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):

 
n, k = map(str, input().split())
print(n+k)

Failing test case input:
odqf r_b

Expected output:
r_bodqf


Actual output:
odqfr_b


Fixed submission (verdict: Accepted):

 
n, k = map(str, input().split())
print(k+n)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = input().split()
print(a[0],a[1])

Failing test case input:
kftu uumf

Expected output:
uumfkftu


Actual output:
kftu uumf


Fixed submission (verdict: Accepted):
a = input().split()
print(a[1]+a[0])

Problem: p02817
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s, t = map(str, input().split())
print(s+t)

Failing test case input:
gums luhu

Expected output:
luhugums


Actual output:
gumsluhu


Fixed submission (verdict: Accepted):
ls = list(map(str, input().split()))
print(ls[1]+ls[0])
Problem: p02817
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
s, t = map(str, input().split())
print(''.join([s, t]))


Failing test case input:
ohqc ]sc

Expected output:
]scohqc


Actual output:
ohqc]sc


Fixed submission (verdict: Accepted):
s, t = map(str, input().split())
print(''.join([t, s]))

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = input().split()
print(B, A)

Failing test case input:
gums luhu

Expected output:
luhugums


Actual output:
luhu gums


Fixed submission (verdict: Accepted):
A, B = input().split()
C = B + A
print(C)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = input().split()
print(a, b, sep="")

Failing test case input:
qfdo c_r

Expected output:
c_rqfdo


Actual output:
qfdoc_r


Fixed submission (verdict: Accepted):
a, b = input().split()
print(b, a, sep="")

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S, T = input().split()
print("{}{}".format(S, T))


Failing test case input:
oder atb

Expected output:
atboder


Actual output:
oderatb


Fixed submission (verdict: Accepted):
S, T = input().split()
print("{}{}".format(T, S))

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = input().split()
print(s+t)

Failing test case input:
kfut uufm

Expected output:
uufmkfut


Actual output:
kfutuufm


Fixed submission (verdict: Accepted):
s, t = input().split()
print(t+s)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def solve(s, t):
    return s + t

s, t = input().split()
print(solve(s, t))

Failing test case input:
odqf s`b

Expected output:
s`bodqf


Actual output:
odqfs`b


Fixed submission (verdict: Accepted):
def solve(s, t):
    return t + s

s, t = input().split()
print(solve(s, t))

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
num = list(input().split())
print(str(num[0])+str(num[1]))

Failing test case input:
ocfq c_r

Expected output:
c_rocfq


Actual output:
ocfqc_r


Fixed submission (verdict: Accepted):
num = list(input().split())
print(str(num[1])+str(num[0]))

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(str,input().split())
print(a+b)

Failing test case input:
redp atb

Expected output:
atbredp


Actual output:
redpatb


Fixed submission (verdict: Accepted):
a,b = map(str,input().split())
print(b+a)

Problem: p02817
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s,t = input().split()
s+=t
print(s)

Failing test case input:
slte ulht

Expected output:
ulhtslte


Actual output:
slteulht


Fixed submission (verdict: Accepted):
s,t=input().split()
t+=s
print(t)

Problem: p02817
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys

S, T = next(sys.stdin).strip().split()
print(T, S)

Failing test case input:
eqdo s`b

Expected output:
s`beqdo


Actual output:
s`b eqdo


Fixed submission (verdict: Accepted):
import sys
 
S, T = next(sys.stdin).strip().split()
print(T + S)
Problem: p02817
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
print("".join(input().split()))

Failing test case input:
etlt ulgt

Expected output:
ulgtetlt


Actual output:
etltulgt


Fixed submission (verdict: Accepted):
print("".join(input().split()[::-1]))

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input().split()
print(S[0]+S[1])

Failing test case input:
chqp ]ct

Expected output:
]ctchqp


Actual output:
chqp]ct


Fixed submission (verdict: Accepted):
S = input().split()
print(S[1]+S[0])

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t = [i for i in input().split()]

print(s+t)

Failing test case input:
redo bta

Expected output:
btaredo


Actual output:
redobta


Fixed submission (verdict: Accepted):
s,t = [i for i in input().split()]
 
print(t+s)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S, T = input().split()
print(S+T)

Failing test case input:
gums humu

Expected output:
humugums


Actual output:
gumshumu


Fixed submission (verdict: Accepted):
S, T = input().split()
print(T+S)

Problem: p02817
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s,t=map(str,input().split())
print(s,t,sep="")


Failing test case input:
odqf s`b

Expected output:
s`bodqf


Actual output:
odqfs`b


Fixed submission (verdict: Accepted):
s,t=map(str,input().split())
print(t,s,sep="")

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S,T = input().split()
print(T,S)

Failing test case input:
tkve tglu

Expected output:
tglutkve


Actual output:
tglu tkve


Fixed submission (verdict: Accepted):
S,T = input().split()
print(T,S, sep="")

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print("".join(input().split()[-1]))


Failing test case input:
qqfc sc^

Expected output:
sc^qqfc


Actual output:
sc^


Fixed submission (verdict: Accepted):
print("".join((input().split())[::-1]))

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = input().split()
print("{}{}".format(s, t))

Failing test case input:
qfdo c_r

Expected output:
c_rqfdo


Actual output:
qfdoc_r


Fixed submission (verdict: Accepted):
s, t = input().split()
print("{}{}".format(t, s))

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
li = list(input())
print(li[1]+li[0])

Failing test case input:
kfst fmuu

Expected output:
fmuukfst


Actual output:
fk


Fixed submission (verdict: Accepted):
li = input().split()
print(li[1]+li[0])

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = input().split()
print(a,end="")
print(b)

Failing test case input:
tkve tglv

Expected output:
tglvtkve


Actual output:
tkvetglv


Fixed submission (verdict: Accepted):
a,b = input().split()
print(b,end="")
print(a)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = input().split()
print(b,a)

Failing test case input:
tkue tflu

Expected output:
tflutkue


Actual output:
tflu tkue


Fixed submission (verdict: Accepted):
a, b = input().split()
print(b,a, sep="")
Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input().split()
 
print(S)

Failing test case input:
redo atb

Expected output:
atbredo


Actual output:
redo, atb

Fixed submission (verdict: Accepted):
S,T = input().split()
print(T+S)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S,T = input().split()

U = S+T
print(U)


Failing test case input:
smug lugu

Expected output:
lugusmug


Actual output:
smuglugu


Fixed submission (verdict: Accepted):
S,T = input().split()

U = T+S
print(U)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S,T = input().split()
print(S+T)

Failing test case input:
qqfc sc^

Expected output:
sc^qqfc


Actual output:
qqfcsc^


Fixed submission (verdict: Accepted):
S,T = input().split()
print(T+S)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = input().split()
print(s+t)

Failing test case input:
pcfq sc_

Expected output:
sc_pcfq


Actual output:
pcfqsc_


Fixed submission (verdict: Accepted):
s, t = input().split()
print(t+s)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y = map(str,input().split())
x += y
print(x)

Failing test case input:
kuet luuf

Expected output:
luufkuet


Actual output:
kuetluuf


Fixed submission (verdict: Accepted):
x,y = map(str,input().split())
y += x
print(y)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


S, T=map(str, input().split())

print(S+T)

Failing test case input:
kftu uumf

Expected output:
uumfkftu


Actual output:
kftuuumf


Fixed submission (verdict: Accepted):


S, T=map(str, input().split())

print(T+S)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=str(input()).split()
print(a+b)

Failing test case input:
qfdo c_r

Expected output:
c_rqfdo


Actual output:
qfdoc_r


Fixed submission (verdict: Accepted):
a,b=input().split()
print(b+a)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
num = list(input().split())
po = num[0]+num[1]
print(po)

Failing test case input:
slte ulht

Expected output:
ulhtslte


Actual output:
slteulht


Fixed submission (verdict: Accepted):
num = list(input().split())
print(str(num[1])+str(num[0]))

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t = input().split()

print(s+t)

Failing test case input:
cqhp ]tc

Expected output:
]tccqhp


Actual output:
cqhp]tc


Fixed submission (verdict: Accepted):
s,t = input().split()

print(t+s)

Problem: p02817
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s, t = input().split()
print(s+t)

Failing test case input:
cqhp ]ct

Expected output:
]ctcqhp


Actual output:
cqhp]ct


Fixed submission (verdict: Accepted):
s, t = input().split()
print(t+s)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = map(str, input().split())
print("{}{}".format(s, t))

Failing test case input:
cgqp sc]

Expected output:
sc]cgqp


Actual output:
cgqpsc]


Fixed submission (verdict: Accepted):
s, t = input().split()
print("{}{}".format(t, s))
Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(str,input().split())
print(a,end="")
print(b)

Failing test case input:
kuft luuf

Expected output:
luufkuft


Actual output:
kuftluuf


Fixed submission (verdict: Accepted):
a,b=map(str,input().split())
print(b,end="")
print(a)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = input().split()
print(a+b)

Failing test case input:
eqdo s`b

Expected output:
s`beqdo


Actual output:
eqdos`b


Fixed submission (verdict: Accepted):
a, b = input().split()
print(b+a)

Problem: p02817
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import sys
sys.setrecursionlimit(12345678)
import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop


def main():
    s, t = input().split()
    print(s + t)

if __name__ == '__main__':
    main()


Failing test case input:
pqfc sc]

Expected output:
sc]pqfc


Actual output:
pqfcsc]


Fixed submission (verdict: Accepted):
import sys
sys.setrecursionlimit(12345678)
import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop


def main():
    s, t = input().split()
    print(t + s)

if __name__ == '__main__':
    main()

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t = input().split()
print(s+t)

Failing test case input:
eqdo s`b

Expected output:
s`beqdo


Actual output:
eqdos`b


Fixed submission (verdict: Accepted):
s,t = input().split()
print(t+s)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S,T=map(str,input().split())
print(S+T)

Failing test case input:
cqhp ]ct

Expected output:
]ctcqhp


Actual output:
cqhp]ct


Fixed submission (verdict: Accepted):
S,T=map(str,input().split())
print(T+S)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b =map(str,input().split())
print("b+a")

Failing test case input:
ocfq c_r

Expected output:
c_rocfq


Actual output:
b+a


Fixed submission (verdict: Accepted):
a,b =map(str,input().split())
print(b+a)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

if __name__ == "__main__":
    A, B = input().split()
    print(A + B)

Failing test case input:
sltf ltgu

Expected output:
ltgusltf


Actual output:
sltfltgu


Fixed submission (verdict: Accepted):

if __name__ == "__main__":
    A, B = input().split()
    print(B + A)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print (''.join(input().split()))

Failing test case input:
tkve tglu

Expected output:
tglutkve


Actual output:
tkvetglu


Fixed submission (verdict: Accepted):
x,y=input().split()
print (y+x)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = input().split()
print(t,s)




Failing test case input:
pcfq _cs

Expected output:
_cspcfq


Actual output:
_cs pcfq


Fixed submission (verdict: Accepted):
s, t = input().split()
print("".join([t, s]))
Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = map(str, input().split())
print(s+t)

Failing test case input:
gumt humu

Expected output:
humugumt


Actual output:
gumthumu


Fixed submission (verdict: Accepted):
s, t = map(str, input().split())
print(t+s)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t = input().split()

print(s + t)

Failing test case input:
keut luuf

Expected output:
luufkeut


Actual output:
keutluuf


Fixed submission (verdict: Accepted):
s,t = input().split()

print(t + s)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print("".join(map(str,input().split())))


Failing test case input:
pqfc sc]

Expected output:
sc]pqfc


Actual output:
pqfcsc]


Fixed submission (verdict: Accepted):
print("".join(list(reversed(list(map(str,input().split()))))))

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S,T = input().split()
print(S+T)

Failing test case input:
etlu ulgt

Expected output:
ulgtetlu


Actual output:
etluulgt


Fixed submission (verdict: Accepted):
S, T = input().split()
print(T+S)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
chars = input().split(" ")
print(chars[0]+chars[1])

Failing test case input:
tkue tflu

Expected output:
tflutkue


Actual output:
tkuetflu


Fixed submission (verdict: Accepted):
chars = input().split(" ")
print(chars[1]+chars[0])

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(map(str, input().split()))
print(a[1], a[0])

Failing test case input:
smtf ltgu

Expected output:
ltgusmtf


Actual output:
ltgu smtf


Fixed submission (verdict: Accepted):
a = list(map(str, input().split()))
print("{}{}".format(a[1], a[0]))

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S,T = map(str, input().split())
print('{}{}'.format(S,T))

Failing test case input:
kftt fmuu

Expected output:
fmuukftt


Actual output:
kfttfmuu


Fixed submission (verdict: Accepted):
S,T = map(str, input().split())
print('{}{}'.format(T,S))

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = input().split()
print(A+B)

Failing test case input:
cqhp ]ct

Expected output:
]ctcqhp


Actual output:
cqhp]ct


Fixed submission (verdict: Accepted):
A, B = input().split()
print(B+A)

Problem: p02817
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):






a = list(map(str,input().split()))

print(a[0]+a[1])

Failing test case input:
keut uluf

Expected output:
ulufkeut


Actual output:
keutuluf


Fixed submission (verdict: Accepted):






a = list(map(str,input().split()))

print(a[1]+a[0])

Problem: p02817
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
A, B = input().split()

print(A+B)


Failing test case input:
smtf lugu

Expected output:
lugusmtf


Actual output:
smtflugu


Fixed submission (verdict: Accepted):
A, B = input().split()

print(B+A)
Problem: p02817
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S,T = input().split()

print(S + T)

Failing test case input:
phqc ]tc

Expected output:
]tcphqc


Actual output:
phqc]tc


Fixed submission (verdict: Accepted):
S,T = input().split()

print(T + S)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=input().split()
print(a+b)

Failing test case input:
kuet luuf

Expected output:
luufkuet


Actual output:
kuetluuf


Fixed submission (verdict: Accepted):
a,b=input().split()
print(b+a)

Problem: p02817
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):


import sys
import math
import collections
import itertools
from inspect import currentframe
INF = 10 ** 10
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) 
def I() : return int(input())
def MI() : return map(int, input().split())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def chkprint(*args) : names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}; print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))

S, T = input().split()

print(S + T)


Failing test case input:
pcfq sc_

Expected output:
sc_pcfq


Actual output:
pcfqsc_


Fixed submission (verdict: Accepted):


import sys
import math
import collections
import itertools
from inspect import currentframe
INF = 10 ** 10
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) 
def I() : return int(input())
def MI() : return map(int, input().split())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def chkprint(*args) : names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}; print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))

S, T = input().split()

print(T + S)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
H,W = [x for x in input().split()]
print(H+W)

Failing test case input:
tkue fulu

Expected output:
fulutkue


Actual output:
tkuefulu


Fixed submission (verdict: Accepted):
H,W = [x for x in input().split()]
print(W+H)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t = input().split()

print(s+t)

Failing test case input:
cqho ]sb

Expected output:
]sbcqho


Actual output:
cqho]sb


Fixed submission (verdict: Accepted):
s,t = input().split()
 
print(t+s)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stdin
a,b = [x for x in stdin.readline().rstrip().split()]
print(a+b)

Failing test case input:
cgqp c]s

Expected output:
c]scgqp


Actual output:
cgqpc]s


Fixed submission (verdict: Accepted):
from sys import stdin
a,b = [x for x in stdin.readline().rstrip().split()]
print(b+a)
Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t = map(str,input().split())
print(s +t)

Failing test case input:
kuft luuf

Expected output:
luufkuft


Actual output:
kuftluuf


Fixed submission (verdict: Accepted):
s,t = map(str,input().split())
print(t+s)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t = input().split(" ")
print(t,s)

Failing test case input:
kfut muuf

Expected output:
muufkfut


Actual output:
muuf kfut


Fixed submission (verdict: Accepted):
s,t = input().split(" ")
print(t+s)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = map(str, input().split())
print(s + t)

Failing test case input:
kftu uumf

Expected output:
uumfkftu


Actual output:
kftuuumf


Fixed submission (verdict: Accepted):
s, t = map(str, input().split()) 
print(t + s)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input().split()

print(''.join(s))


Failing test case input:
rdeo b`t

Expected output:
b`trdeo


Actual output:
rdeob`t


Fixed submission (verdict: Accepted):
s = input().split()
s = reversed(s)
print(''.join(s))

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t=map(str,input().split())
print(s+t)

Failing test case input:
qfdo c_r

Expected output:
c_rqfdo


Actual output:
qfdoc_r


Fixed submission (verdict: Accepted):
s,t=map(str,input().split())
print(t+s)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t = map(str, input().split())
print(s+t)

Failing test case input:
qedo b`s

Expected output:
b`sqedo


Actual output:
qedob`s


Fixed submission (verdict: Accepted):
s,t = map(str, input().split())
print(t+s)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

S, T = read().split()
answer = T+S
print(answer)


Failing test case input:
sltf ltgu

Expected output:
ltgusltf


Actual output:
b'ltgusltf'


Fixed submission (verdict: Accepted):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
S,T = read().decode('utf-8').split()
 
answer = T + S
print(answer)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t = input().split()

print(s+t)

Failing test case input:
cgqp c]s

Expected output:
c]scgqp


Actual output:
cgqpc]s


Fixed submission (verdict: Accepted):
s,t = input().split()

print(t+s)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
if __name__ == "__main__":
	S, T = input().split()
	print(S + T)

Failing test case input:
kftu uumf

Expected output:
uumfkftu


Actual output:
kftuuumf


Fixed submission (verdict: Accepted):
if __name__ == "__main__":
	S, T = input().split()
	print(T + S)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S, T = input().split()
print(S + T)

Failing test case input:
gums muhu

Expected output:
muhugums


Actual output:
gumsmuhu


Fixed submission (verdict: Accepted):
S, T = input().split()
print(T +S)
Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = input().split()
print(a+b)

Failing test case input:
gums luhu

Expected output:
luhugums


Actual output:
gumsluhu


Fixed submission (verdict: Accepted):
a,b = input().split()
print(b,a,sep ='')

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t = input().split()
print(t, end=" ")
print(s)

Failing test case input:
tkue fulu

Expected output:
fulutkue


Actual output:
fulu tkue


Fixed submission (verdict: Accepted):
s,t = input().split()
print(t, end="")
print(s)

Problem: p02817
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s, t = map(str, input().split())
print(s+t)


Failing test case input:
sltf ulth

Expected output:
ulthsltf


Actual output:
sltfulth


Fixed submission (verdict: Accepted):
s, t = map(str, input().split())
print(t+s)

Problem: p02817
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S, T= map(str, input().split())
print(S + T)

Failing test case input:
teuk uluf

Expected output:
ulufteuk


Actual output:
teukuluf


Fixed submission (verdict: Accepted):
S , T = map(str, input().split())
print(T + S)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = input().split()
print(s, t, sep="")

Failing test case input:
qedo b`s

Expected output:
b`sqedo


Actual output:
qedob`s


Fixed submission (verdict: Accepted):
s, t = input().split()
print(t, s, sep="")

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S,T = map(str,input().split())
print ( S + T )


Failing test case input:
odqf r_b

Expected output:
r_bodqf


Actual output:
odqfr_b


Fixed submission (verdict: Accepted):
S,T = map(str,input().split())
print ( T + S )

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S,T =map(str,input().split())

print(S,end="")
print(T)

Failing test case input:
pqfc sc]

Expected output:
sc]pqfc


Actual output:
pqfcsc]


Fixed submission (verdict: Accepted):
S,T =map(str,input().split())

print(T,end="")
print(S)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=input().split()
print(a[0]+a[1])


Failing test case input:
pdfq b_r

Expected output:
b_rpdfq


Actual output:
pdfqb_r


Fixed submission (verdict: Accepted):
a=input().split()
print(a[1]+a[0])

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = input().split()
print(a,b,sep ='')

Failing test case input:
qfdp b_r

Expected output:
b_rqfdp


Actual output:
qfdpb_r


Fixed submission (verdict: Accepted):
a,b = input().split()
print(b,a,sep ='')

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S, T = map(str, input().split())
print(S+T,end="")

Failing test case input:
smtf ltgu

Expected output:
ltgusmtf


Actual output:
smtfltgu

Fixed submission (verdict: Accepted):
S, T = map(str, input().split())
print(T+S)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(str,input().split())
print(a+b)

Failing test case input:
kfut uufm

Expected output:
uufmkfut


Actual output:
kfutuufm


Fixed submission (verdict: Accepted):
a,b=map(str,input().split())
print(b+a)
Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S,T = input().split()

print(T,S)


Failing test case input:
ocfq _sc

Expected output:
_scocfq


Actual output:
_sc ocfq


Fixed submission (verdict: Accepted):
S,T = input().split()

print(T+S)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S,T=list(map(str,input().split()))
print(T,S)

Failing test case input:
tkue tulf

Expected output:
tulftkue


Actual output:
tulf tkue


Fixed submission (verdict: Accepted):
S,T=list(map(str,input().split()))
print(T+S)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
line = input()
s, t = line.split(" ")
ans = s + t
print(ans)


Failing test case input:
sltf gtlu

Expected output:
gtlusltf


Actual output:
sltfgtlu


Fixed submission (verdict: Accepted):
line = input()
s, t = line.split(" ")
ans = t + s
print(ans)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S, T = map(str, input().split())
print(S+T)


Failing test case input:
odqf b_r

Expected output:
b_rodqf


Actual output:
odqfb_r


Fixed submission (verdict: Accepted):
S, T = map(str, input().split())
print(T+S)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
inputValue = input()

output = ''.join(inputValue.split())

print(output)

Failing test case input:
cgqp c]s

Expected output:
c]scgqp


Actual output:
cgqpc]s


Fixed submission (verdict: Accepted):
inputValue = input()

output = ''.join(reversed(inputValue.split()))

print(output)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = input().split()
print(s+t)

Failing test case input:
odqf r_b

Expected output:
r_bodqf


Actual output:
odqfr_b


Fixed submission (verdict: Accepted):
s, t = input().split()
print(t+s)

Problem: p02817
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
S,T = input().split()
print(S+T)


Failing test case input:
eqdo s`b

Expected output:
s`beqdo


Actual output:
eqdos`b


Fixed submission (verdict: Accepted):
S,T = input().split()
print(T+S)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S,T = map(str,input().split())
print(S+T)

Failing test case input:
ocfq _sc

Expected output:
_scocfq


Actual output:
ocfq_sc


Fixed submission (verdict: Accepted):
S,T = map(str,input().split())
print(T+S)

Problem: p02817
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t = map(str,input().split())
print(s+t)

Failing test case input:
cgqp ]cs

Expected output:
]cscgqp


Actual output:
cgqp]cs


Fixed submission (verdict: Accepted):
s,t = map(str,input().split())
print(t+s)
Problem: p03741
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
A=list(map(int,input().split()))
s=0
t=0
a=0
b=0
for i in range(N):
    s+=A[i]
    if i%2==0:
        if s>=0:
            a+=s+1
            s=-1
    if i%2!=0:
        if s<=0:
            a+=-s+1
            s=1
for j in range(N):
    t+=A[i]
    if j%2!=0:
        if t>=0:
            b+=t+1
            t=-1
    if j%2==0:
        if t<=0:
            b+=-t+1
            t=1
print(min(a,b))

Failing test case input:
4
1 -3 1 0

Expected output:
4

Actual output:
7


Fixed submission (verdict: Accepted):
N=int(input())
A=list(map(int,input().split()))
s=0
t=0
a=0
b=0
for i in range(N):
    s+=A[i]
    if i%2==0:
        if s>=0:
            a+=s+1
            s=-1
    if i%2!=0:
        if s<=0:
            a+=-s+1
            s=1
for j in range(N):
    t+=A[j]
    if j%2!=0:
        if t>=0:
            b+=t+1
            t=-1
    if j%2==0:
        if t<=0:
            b+=-t+1
            t=1
print(min(a,b))

Problem: p03741
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def osilate(seq):
    flag = 1
    acc = 0
    ans = 0
    while len(seq) > 0:
        
        a = seq[0]
        acc += a
        if flag > 0:
            if acc <= 0:
                ans += 1-acc
                acc = 1
        if flag < 0:
            if a >= 0:
                ans += 1+acc
                acc = -1
        seq.pop(0)
        flag = flag * (-1)
    return ans

n = int(input())
seq = [int(i) for i in input().split()] + [0]
acc = []
tmp = 0

seq_rev = [-i for i in seq]
print(min(osilate(seq),osilate(seq_rev)))


Failing test case input:
4
1 -3 1 0

Expected output:
4

Actual output:
6


Fixed submission (verdict: Accepted):
def osilate(seq):
    flag = 1
    acc = 0
    ans = 0
    
    for i in range(len(seq)):
        a = seq[i]
        acc += a
        flag = i%2

        if flag == 0:
            if acc <= 0:
                ans += 1-acc
                acc = 1
        if flag == 1:
            if acc >= 0:
                ans += 1+acc
                acc = -1
        
        flag = flag * (-1)
    return ans

n = int(input()) 
seq = [int(i) for i in input().split()] 

seq_rev = [-i for i in seq]  
print(min(osilate(seq),osilate(seq_rev)))
Problem: p03741
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))

def calc(tmp, cnt=0):
    for i in a[1:]:
        if tmp < 0:
            tmp = tmp + i
            if tmp <= 0:
                cnt += -tmp + 1
                tmp = 1
        elif tmp > 0:
            tmp = tmp + i
            if tmp >= 0:
                cnt += tmp + 1
                tmp = -1
    return cnt

if a[0]:
    hugou = 1 if a[0] > 0 else -1
    min(calc(a[0]), calc(-hugou, abs(a[0]) + 1))
else:
    print(min(calc(1, 1), calc(-1, 1)))

Failing test case input:
4
1 -3 1 0

Expected output:
4

Actual output:

Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int,input().split()))

def calc(tmp, cnt=0):
    for i in a[1:]:
        if tmp < 0:
            tmp = tmp + i
            if tmp <= 0:
                cnt += -tmp + 1
                tmp = 1
        elif tmp > 0:
            tmp = tmp + i
            if tmp >= 0:
                cnt += tmp + 1
                tmp = -1
    return cnt

if a[0]:
    hugou = 1 if a[0] > 0 else -1
    print(min(calc(a[0]), calc(-hugou, abs(a[0]) + 1)))
else:
    print(min(calc(1, 1), calc(-1, 1)))

Problem: p03741
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=list(map(int,input().split()))
p=[1,-1]
j=[-1,1]
c=a[0]
l=a[0]
d=0
e=0
for i in range(1,n):
    s=i%2
    c+=a[i]
    l+=a[i]
    if p[s]*c<=0:
        d+=abs(c-p[s])
        c=p[s]
    if j[s]*c>=0:
        e+=abs(c-j[s])
        l=j[s]      
print(min(e,d))

Failing test case input:
4
1 -3 1 0

Expected output:
4

Actual output:
0


Fixed submission (verdict: Accepted):
n=int(input())
a=list(map(int,input().split()))
p=[1,-1]
j=[-1,1]
c=0
l=0
d=0
e=0
for i in range(n):
    s=i%2
    c+=a[i]
    l+=a[i]
    if p[s]*c<=0:
        d+=abs(c-p[s])
        c=p[s]
    if j[s]*l<=0:
        e+=abs(l-j[s])
        l=j[s] 
print(min(e,d))

Problem: p03741
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int, input().split()))

def func(A, plus):
  total = 0
  ans = 0
  if plus:
    if A[0] <= 0:
      ans = abs(A[0])+1
      total = 1
  else:
    if A[0] >= 0:
      ans += abs(A[0])+1
      total = -1
  for a in A[1:]:
    t = total + a
    if total * t < 0:
      total = t
      continue
    ans += abs(t)+1
    total = -1 if total > 0 else 1
  return ans

print(min(func(A, True), func(A, False)))

Failing test case input:
4
1 -3 1 0

Expected output:
4

Actual output:
9


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int, input().split()))

def func(A, plus):
  total = A[0]
  ans = 0
  if plus:
    if A[0] <= 0:
      ans = abs(A[0])+1
      total = 1
  else:
    if A[0] >= 0:
      ans += abs(A[0])+1
      total = -1
  for a in A[1:]:
    t = total + a
    if total * t < 0:
      total = t
      continue
    ans += abs(t)+1
    total = -1 if total > 0 else 1
  return ans

print(min(func(A, True), func(A, False)))
Problem: p03741
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
s = a[0]
ans = 0
p = lambda x, y: x * y >= 0

if s == 0:
    s = -1
    ans =1
    for i in range(1, n):
        ans +=  abs(s + a[i]) + 1 if p(s, s + a[i]) else 0
        s = -1 * s 
    s = 1
    tmpAns = 1
    for i in range(1, n):
        tmpAns +=  abs(s + a[i]) + 1 if p(s, s + a[i]) else 0
        s = -1 * s 
    ans = min(ans, tmpAns)
else:
    for i in range(1, n):
        ans +=  abs(s + a[i]) + 1 if p(s, s + a[i]) else 0
        s = -1 * s 

print(ans)


Failing test case input:
4
1 -3 1 0

Expected output:
4

Actual output:
3


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))
ans = 10 ** 100
p = lambda x, y: x * y >= 0
po = lambda x, y: abs(x + y) + 1 if p(x, x + y) else 0
popo = lambda x, y: -1 * x 


if a[0] == 0:
    s = [1, -1]
    tmpAns = [1, 1]
    for (_s, _ans) in zip(s, tmpAns):
        for i in range(1, n):
            _ans +=  po(_s, a[i])
            _s = popo(_s, a[i])
        ans = min((ans, _ans))
else:
    s = [a[0], -1 * a[0] 
    tmpAns = [0, abs(a[0]) + 1]
    for (_s, _ans) in zip(s, tmpAns):
        for i in range(1, n):
            _ans +=  po(_s, a[i])
            _s = popo(_s, a[i])
        ans = min((ans, _ans))

print(ans)

Problem: p03741
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=list(map(int,input().split()))
p=[1,-1]
j=[-1,1]
c=0
l=0
d=0
e=0
for i in range(n):
    s=i%2
    c+=a[i]
    l+=a[i]
    print(c,l)
    if p[s]*c<=0:
        d+=abs(c-p[s])
        c=p[s]
    if j[s]*l<=0:
        e+=abs(l-j[s])
        l=j[s] 
print(min(e,d))

Failing test case input:
4
1 -3 1 0

Expected output:
4

Actual output:
1 1
-2 -4
-1 2
1 -1
4


Fixed submission (verdict: Accepted):
n=int(input())
a=list(map(int,input().split()))
p=[1,-1]
j=[-1,1]
c=0
l=0
d=0
e=0
for i in range(n):
    s=i%2
    c+=a[i]
    l+=a[i]
    if p[s]*c<=0:
        d+=abs(c-p[s])
        c=p[s]
    if j[s]*l<=0:
        e+=abs(l-j[s])
        l=j[s] 
print(min(e,d))
Problem: p02695
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
from itertools import combinations_with_replacement
n,m,q=map(int,input().split())
l=[list(map(int,input().split())) for i in range(q)]
ans=0
for i in combinations_with_replacement([i for i in range(1,11)], n):
    tmp=0
    for a,b,c,d in l:
        if i[b-1]-i[a-1]==c:
            tmp+=d
    ans=max(ans,tmp)
print(ans)

Failing test case input:
3 4 2
2 3 3 101
1 2 2 16
2 3 2 14

Expected output:
101


Actual output:
117


Fixed submission (verdict: Accepted):
from itertools import combinations_with_replacement
n,m,q=map(int,input().split())
l=[list(map(int,input().split())) for i in range(q)]
ans=0
for i in combinations_with_replacement([i for i in range(1,m+1)], n):
    tmp=0
    for a,b,c,d in l:
        if i[b-1]-i[a-1]==c:
            tmp+=d
    ans=max(ans,tmp)
print(ans)

Problem: p02695
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, M, Q = map(int, input().split())
abcd = [list(map(int, input().split())) for _ in range(Q)]

ans = []
import itertools
for A in itertools.combinations_with_replacement(range(1, 10), N):
    tmp = 0
    for a, b, c, d in abcd:
        if A[b-1] - A[a-1] == c:
            tmp += d
    ans.append(tmp)
print(max(ans))

Failing test case input:
4 1 10
2 4 1 86568
1 4 0 90629
2 3 0 90310
3 4 1 1648
3 4 1 114896
3 4 2 8580
2 2 0 96263
2 4 2 2156
1 3 0 28081
2 4 3 94328

Expected output:
305283


Actual output:
417766


Fixed submission (verdict: Accepted):
N, M, Q = map(int, input().split())
abcd = [list(map(int, input().split())) for _ in range(Q)]

ans = []
import itertools
for A in itertools.combinations_with_replacement(range(1, M+1), N):
    tmp = 0
    for a, b, c, d in abcd:
        if A[b-1] - A[a-1] == c:
            tmp += d
    ans.append(tmp)
print(max(ans))