ZhenlongDai/ACPR huggingface dataset:
Problem: p04047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = int(input())
b = list(map(int,input().split()))
b = sorted(b)
c = 0
for i in range(0,a,2):
    c += b[i]
print(c)

Failing test case input:
5
101 40 0 0 0 10 0 28 1 302

Expected output:
130


Actual output:
1


Fixed submission (verdict: Accepted):
a = int(input())
b = list(map(int,input().split()))
b = sorted(b)
c = 0
for i in range(0,2*a,2):
    c += b[i]
print(c)

Problem: p04047
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())
array=input()
L=[int(val) for val in array.split()]
L=sorted(L,reverse=True)
print(L)
total=0
start=0
for _ in range(N):
  total+=min(L[start],L[start+1])
  
  
  start+=2
print(total)

Failing test case input:
2
-1 -4 0 0

Expected output:
-4


Actual output:
[0, 0, -1, -4]
-4


Fixed submission (verdict: Accepted):
N=int(input())
inp=input()
L=[int(val) for val in inp.split()]
L=sorted(L,reverse=True)
total=0
start=0
for _ in range(N):
  total+=min(L[start],L[start+1])
  start+=2
print(total)

Problem: p04047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = input()
l = map(int, input().split())
l = sorted(l)
 
ans = 0
for i in range(len(n)):
  a = l[2*i]
  b = l[2*i+1]
  ans =+ min(a,b)
 
print(ans)

Failing test case input:
5
001 7 1 1 1 0 0 7 0 3

Expected output:
9


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
l = map(int, input().split())
l = sorted(l)

ans = 0
for i in range(n):
    a = l[2 * i]
    b = l[2 * i + 1]
    ans = ans + min(a, b)

print(ans)

Problem: p04047
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())
X = list(map(int, input().split()))
s = 0
for i in range(N):
    s += X[2*i]
print(s)


Failing test case input:
2
-1 -1 -1 -8

Expected output:
-9


Actual output:
-2


Fixed submission (verdict: Accepted):
N = int(input())
X = sorted(list(map(int, input().split())))
s = 0
for i in range(N):
    s += X[2*i]
print(s)

Problem: p04047
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
l = list(map(int,input().split()))
l.sort(reverse=True)
print(sum(l[0::2]))

Failing test case input:
2
-2 -1 -13 0

Expected output:
-14


Actual output:
-2


Fixed submission (verdict: Accepted):
n = int(input())
l = list(map(int,input().split()))
l.sort(reverse=True)
print(sum(l[1::2]))

Problem: p04047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = int(input())
b = input()

b = b.split()
b = [int(x) for x in b]

b = sorted(b)
b = b[::-1]
print(b)

def get(a,x):
	if a == 0:
		return 0
	x.pop(0)
	add = x.pop(0)

	return add + get((a-1),x)

print(str(get(a,b)))

Failing test case input:
5
101 5 -1 0 -1 1 -11 13 0 27

Expected output:
20


Actual output:
[101, 27, 13, 5, 1, 0, 0, -1, -1, -11]
20


Fixed submission (verdict: Accepted):
a = int(input())
b = input()

b = b.split()
b = [int(x) for x in b]

b = sorted(b)
b = b[::-1]

def get(a,x):
	if a == 0:
		return 0
	x.pop(0)
	add = x.pop(0)

	return add + get((a-1),x)

print(str(get(a,b)))
Problem: p04047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())

s = list(map(int,input().split()))

s.sort(reverse=True)

sum = 0

for i in range(N):
  sum = sum + s[2*i]

print(sum)

Failing test case input:
5
110 0 1 0 -1 13 1 13 2 117

Expected output:
123


Actual output:
133


Fixed submission (verdict: Accepted):
N = int(input())

s = list(map(int,input().split()))

s.sort()

sum = 0

for i in range(N):
  sum = sum + s[2*i]

print(sum)

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


n = int(input())
l = list(map(int, input().split()))
l.sort()
ans = 0
for i in range(n):
    if i % 2 == 0:
        ans += l[i]

print(ans)


Failing test case input:
2
-4 -1 -36 0

Expected output:
-37


Actual output:
-36


Fixed submission (verdict: Accepted):


n = int(input())
l = list(map(int, input().split()))
l.sort()
ans = 0
for i in range(2 * n):
    if i % 2 == 0:
        ans += l[i]

print(ans)

Problem: p04047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
l=list(map(int,input().split()))
l.sort()
sum=0
for x in range(0,n*2,2):
    sum+=max(l[x:x+2])
print(sum)


Failing test case input:
2
-2 -2 -66 2

Expected output:
-68


Actual output:
0


Fixed submission (verdict: Accepted):
n=int(input())
l=list(map(int,input().split()))
l.sort()
sum=0
for x in range(0,n*2,2):
    sum+=min(l[x:x+2])
print(sum)

Problem: p04047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = sorted(list(map(int, input().split())))
ans = 0
for i in range(0, len(a), 2):
  ans += a[i]
print(ans)

Failing test case input:
5
101 2 0 -1 -1 0 -12 13 1 27

Expected output:
16


Actual output:
5


Fixed submission (verdict: Accepted):
n = input()
a = sorted(list(map(int, input().split())))
ans = 0
for i in range(0, len(a), 2):
  ans += a[i]
print(ans)

Problem: p04047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
l=list(map(int,input().split()))
l.sort()
ans=sum(l[1::2])
print(ans)

Failing test case input:
5
101 28 0 0 1 5 0 28 2 163

Expected output:
131


Actual output:
197


Fixed submission (verdict: Accepted):
n = int(input())
l = list(map(int, input().split()))
l.sort()
ans = sum(l[0::2])
print(ans)

Problem: p04047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
l=list(map(int,input().split()))
l.sort()
s=0
for i in range(n):
  s+=l[i]
print(s)


Failing test case input:
5
100 1 2 3 14 15 58 58 58 29

Expected output:
135

Actual output:
35


Fixed submission (verdict: Accepted):
n=int(input())
l=list(map(int,input().split()))
l.sort()
s=0
for i in range(2*n)[::2]:
  s+=l[i]
print(s)

Problem: p04047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = int(input())

b = list(map(int,input().split()))

b.sort()

su = 0

for i in range(a-1):
  su += b[2*i]
print(su)

Failing test case input:
5
101 2 2 0 0 4 -3 13 1 47

Expected output:
50


Actual output:
3


Fixed submission (verdict: Accepted):
a = int(input())

b = list(map(int,input().split()))

b.sort()

su = 0

for i in range(a):
  su += b[2*i]
print(su)
Problem: p04047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
l = sorted(list(map(int,input().split())))

c = 0
for i in range(n):
    c +=l[i]
    print(c)

Failing test case input:
5
010 14 -1 -1 0 1 -2 20 0 56

Expected output:
27


Actual output:
-2
-3
-4
-4
-4


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

c = 0
for i in range(n):
    c += l[2*i]
print(c)

Problem: p04047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
l = sorted(list(map(int,input().split())))

c = 0
for i in range(n):
    c +=l[i]
print(c)

Failing test case input:
2
-12 1 2 -4

Expected output:
-11


Actual output:
-16


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

c = 0
for i in range(n):
    c += l[2*i]
print(c)

Problem: p04047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
input_word = input()
N = int(input_word)
input_word = input()
tmp_list = input_word.split(" ")
input_list = [ int(i) for i in tmp_list ]

input_list.sort()
print(input_list)
output = 0
for i in range(N):
  output += input_list[2*i]

print(output)
      

Failing test case input:
5
101 28 0 0 1 5 0 28 4 163

Expected output:
133


Actual output:
[0, 0, 0, 1, 4, 5, 28, 28, 101, 163]
133


Fixed submission (verdict: Accepted):
input_word = input()
N = int(input_word)
input_word = input()
tmp_list = input_word.split(" ")
input_list = [ int(i) for i in tmp_list ]
input_list.sort()
output = 0
for i in range(N):
  output += input_list[2*i]
print(output)

Problem: p04047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
input()
print(sum(list(map(int,input().split()))[0:-1:2] ))

Failing test case input:
5
000 1 1 0 0 4 -4 13 1 88

Expected output:
11


Actual output:
-2


Fixed submission (verdict: Accepted):
input()
print(sum(list(sorted(list(map(int,input().split()))))[0:-1:2] ))

Problem: p04047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = int(input())
b = input()

b = b.split()
b = [int(x) for x in b]

b = sorted(b)
b = b[::-1]
print(b)

def get(a,x):
	if a == 0:
		return 0
	x.pop(0)
	add = x.pop(0)

	return add + get((a-1),x)

print(get(a,b))

Failing test case input:
5
010 0 1 0 -1 13 1 13 2 117

Expected output:
23


Actual output:
[117, 13, 13, 10, 2, 1, 1, 0, 0, -1]
23


Fixed submission (verdict: Accepted):
a = int(input())
b = input()

b = b.split()
b = [int(x) for x in b]

b = sorted(b)
b = b[::-1]

def get(a,x):
	if a == 0:
		return 0
	x.pop(0)
	add = x.pop(0)

	return add + get((a-1),x)

print(str(get(a,b)))

Problem: p04047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int,input()
data= list(map(int, input().split()))
data.sort()
print(data)
j=0
for i in range(0,len(data),2):
	j+=data[i]
print(j)

Failing test case input:
5
110 0 0 0 -1 11 1 13 2 117

Expected output:
121


Actual output:
[-1, 0, 0, 0, 1, 2, 11, 13, 110, 117]
121


Fixed submission (verdict: Accepted):
N=int(input())
data= list(map(int, input().split()))
data.sort()
j=0
for i in range(0,2*N,2):
	j+=data[i]
print(j)
Problem: p04047
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = int(input())
print(a)
x = sorted(list(map(int,input().split())))
print(x)
cnt=0
for i in range(a):
  cnt += x[2*i]
print(cnt)

Failing test case input:
2
-12 1 2 -4

Expected output:
-11


Actual output:
2
[-12, -4, 1, 2]
-11


Fixed submission (verdict: Accepted):
a = int(input())
x = sorted(list(map(int,input().split())))
cnt=0
for i in range(a):
  cnt += x[2*i]
print(cnt)
Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
i = int(input())
 
tarou = 0
hanako = 0

for x in range(i):
    a,b = input().split()
    if a > b:
        hanako += 3
    elif b > a:
        tarou += 3
    else:
        hanako += 1
        tarou += 1
    print("{0} {1}".format(tarou, hanako))

Failing test case input:
3
f`v gph
jrhd igug
nojk rheug

Expected output:
3 6


Actual output:
3 0
3 3
6 3


Fixed submission (verdict: Accepted):
i = int(input())

tarou = 0
hanako = 0

for x in range(i):
    a,b = input().split()
    if b > a:
        hanako += 3
    elif a > b:
        tarou += 3
    else:
        hanako += 1
        tarou += 1
print("{0} {1}".format(tarou, hanako))

Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):



n = int(input())

scores = [0,0]

for i in range(n):
    card = input().split()
    old_card = card
    card.sort()
    if (card[0] == card[1]):
        scores[0] += 1
        scores[1] += 1
    elif(old_card[0] == card[0]):
        scores[1] += 3
    else:
        scores[0] += 3

print(scores[0], scores[1])

Failing test case input:
3
uea goe
dirh giuh
nojk tiger

Expected output:
3 6


Actual output:
0 9


Fixed submission (verdict: Accepted):



n = int(input())

scores = [0,0]

for i in range(n):
    card = input().split()
    first_card = card[0]
    card.sort()
    if (card[0] == card[1]):
        scores[0] += 1
        scores[1] += 1
    elif(first_card == card[0]):
        scores[1] += 3
    else:
        scores[0] += 3

print(scores[0], scores[1])

Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
i = int(input())
 
tarou = 0
hanako = 0

for x in range(i):
    a,b = input().split()
    if b > a:
        hanako += 3
    elif a > b:
        tarou += 3
    else:
        hanako += 1
        tarou += 1
    print("{0} {1}".format(tarou, hanako))

Failing test case input:
3
v`f gmg
hrjd juhf
konj hvtgf

Expected output:
6 3


Actual output:
3 0
3 3
6 3


Fixed submission (verdict: Accepted):
i = int(input())

tarou = 0
hanako = 0

for x in range(i):
    a,b = input().split()
    if b > a:
        hanako += 3
    elif a > b:
        tarou += 3
    else:
        hanako += 1
        tarou += 1
print("{0} {1}".format(tarou, hanako))
Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())

score_taro, score_hanako = 0, 0
for _ in range(n):
    card_taro, card_hanako = input().split()

    point_taro, point_hanako = 0, 0
    if card_taro == card_hanako:
        score_taro = 1
        score_hanako = 1
        continue
    for i in range(min(len(card_taro), len(card_hanako))):
        if ord(card_taro[i:i+1]) > ord(card_hanako[i:i+1]):
            score_taro += 3
            break
        if ord(card_taro[i:i+1]) < ord(card_hanako[i:i+1]):
            score_hanako += 3
            break
    if len(card_taro) > len(card_hanako):
        score_taro += 3
    elif len(card_taro) < len(card_hanako):
        score_hanako += 3

print("{0} {1}".format(score_taro, score_hanako))

Failing test case input:
3
f`v gph
jrhd giug
npjk rhetg

Expected output:
3 6


Actual output:
3 9


Fixed submission (verdict: Accepted):
n = int(input())

score_taro, score_hanako = 0, 0
for _ in range(n):
    card_taro, card_hanako = input().split()

    point_taro = 0
    point_hanako = 0
    if card_taro == card_hanako:
        score_taro += 1
        score_hanako += 1
        continue
    for i in range(min(len(card_taro), len(card_hanako))):
        if len(card_taro) > len(card_hanako):
            point_taro = 3
        elif len(card_taro) < len(card_hanako):
            point_hanako = 3
        if ord(card_taro[i:i+1]) > ord(card_hanako[i:i+1]):
            point_taro = 3
            point_hanako = 0
            break
        if ord(card_taro[i:i+1]) < ord(card_hanako[i:i+1]):
            point_taro = 0
            point_hanako = 3
            break
    score_taro += point_taro
    score_hanako += point_hanako
print("{0} {1}".format(score_taro, score_hanako))

Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
taro = 0
hana = 0
n = int(input())
for _ in range(n):
    taro_s, hana_s = map(str, input().split())
    if taro_s < hana_s:
        taro += 3
    elif hana_s < taro_s:
        hana += 3
    else:
        taro += 1
        hana += 1
print(taro, hana)



Failing test case input:
3
aeu goe
dirh giuh
nojk tiger

Expected output:
0 9


Actual output:
9 0


Fixed submission (verdict: Accepted):
taro = 0
hana = 0
n = int(input())
for _ in range(n):
    taro_s, hana_s = map(str, input().split())
    if taro_s > hana_s:
        taro += 3
    elif hana_s > taro_s:
        hana += 3
    else:
        taro += 1
        hana += 1
print(taro, hana)
Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
t_point = 0
h_point = 0
for i in range(n):
    card = input().split()
    print(card)
    taro = card[0]
    card.sort()
    card.reverse()
    print(card)
    if card[0] == card[1]:
        t_point += 1
        h_point += 1
    elif card[0] == taro:
        t_point += 3
    else:
        h_point += 3

print(t_point,h_point)

Failing test case input:
3
`fv hpg
jrid giug
npjk rhteg

Expected output:
3 6


Actual output:
['`fv', 'hpg']
['hpg', '`fv']
['jrid', 'giug']
['jrid', 'giug']
['npjk', 'rhteg']
['rhteg', 'npjk']
3 6


Fixed submission (verdict: Accepted):
n = int(input())
t_point = 0
h_point = 0
for i in range(n):
    card = input().split()
    taro = card[0]
    card.sort()
    card.reverse()
    if card[0] == card[1]:
        t_point += 1
        h_point += 1
    elif card[0] == taro:
        t_point += 3
    else:
        h_point += 3

print(t_point,h_point)

Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):


n = int(input())
point_t = 0
point_h = 0

for i in range(n):
    cards = input()
    taro = cards[0]
    hanako = cards[1]
    if taro > hanako:
        point_h += 3
    elif taro == hanako:
        point_t += 3
    elif taro < hanako:
        point_t += 1
        point_h += 1

print(point_t, point_h)


Failing test case input:
3
v`f fmg
jrhd juhf
jonj huvgf

Expected output:
6 3


Actual output:
2 5


Fixed submission (verdict: Accepted):


n = int(input())
point_t = 0
point_h = 0

for i in range(n):
    cards = list(map(str, input().split()))
    taro = cards[0]
    hanako = cards[1]
    if taro < hanako:
        point_h += 3
    elif taro > hanako:
        point_t += 3
    else:
        point_t += 1
        point_h += 1

print(point_t, point_h)

Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):



n = int(input())

scores = [0,0]

for i in range(n):
    card = input().split()
    first_card = card[0]
    card.sort()
    print(card)
    print(first_card)
    if (card[0] == card[1]):
        scores[0] += 1
        scores[1] += 1
    elif(first_card == card[0]):
        scores[1] += 3
    else:
        scores[0] += 3

print(scores[0], scores[1])

Failing test case input:
3
v`f gpg
jrhd igug
jonk rheug

Expected output:
6 3


Actual output:
['gpg', 'v`f']
v`f
['igug', 'jrhd']
jrhd
['jonk', 'rheug']
jonk
6 3


Fixed submission (verdict: Accepted):



n = int(input())

scores = [0,0]

for i in range(n):
    card = input().split()
    first_card = card[0]
    card.sort()
    if (card[0] == card[1]):
        scores[0] += 1
        scores[1] += 1
    elif(first_card == card[0]):
        scores[1] += 3
    else:
        scores[0] += 3

print(scores[0], scores[1])
Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
t_point = h_point = 0
for i in range(n):
    t_card,h_card = [x for x in input().split( )]
    if t_card[0] > h_card[0]:
        t_point += 3
    elif t_card[0] < h_card[0]:
        h_point += 3
    else:
        t_point += 1
        h_point += 1
print(t_point,h_point)



Failing test case input:
3
v`f fmg
jrhd juhf
jonj huvgf

Expected output:
6 3


Actual output:
7 1


Fixed submission (verdict: Accepted):
n = int(input())
t_point = h_point = 0
for i in range(n):
    t_card,h_card = [x for x in input().split( )]
    if t_card > h_card:
        t_point += 3
    elif t_card < h_card:
        h_point += 3
    else:
        t_point += 1
        h_point += 1
print(t_point,h_point)

Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
count = int(input())
Taro_an = []
Hanako_an = []
Ts = 0
Hs = 0
for i in range(count) :
    animal = input().split(" ")
    Taro_an = animal[0]
    Hanako_an = animal[1]
    if Taro_an > Hanako_an :
        Ts += 3
    else :
        if Hanako_an > Taro_an :
            Hs += 3
        else :
            ++Ts, ++Hs
print(Ts,Hs)

Failing test case input:
3
cat dog
fish fish
lion tiger

Expected output:
1 7

Actual output:
0 6


Fixed submission (verdict: Accepted):
count = int(input())
Taro_an = []
Hanako_an = []
Ts = 0
Hs = 0
for i in range(count) :
    animal = input().split(" ")
    Taro_an = animal[0]
    Hanako_an = animal[1]
    if Taro_an > Hanako_an :
        Ts += 3
    else :
        if Hanako_an > Taro_an :
            Hs += 3
        else :
            Ts += 1; Hs += 1
print(Ts,Hs)

Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
Taro = 0
Hanako = 0
for i in range(n):
    t,h = input().split()
    for j in range(min(len(t),len(h))):
        if t == h:
            Hanako += 1
            Taro += 1
            break
        if ord(t[j:j+1]) > ord(h[j:j+1]):
            Taro += 3
            break
        if ord(t[j:j+1]) < ord(h[j:j+1]):
            Hanako += 3
            break
    if len(t) > len(h):
        Taro += 3
    elif len(t) < len(h):
        Hanako += 3
	

print("{} {}".format(Taro,Hanako))

Failing test case input:
3
act goe
fish gith
lion tiger

Expected output:
0 9


Actual output:
0 12


Fixed submission (verdict: Accepted):
n = int(input())
Taro = 0
Hanako = 0

for i in range(n):
    x = 0
    t,h = input().split()
    for j in range(min(len(t),len(h))):
        if t == h:
            Hanako += 1
            Taro += 1
            x = 1 
            break
        if ord(t[j:j+1]) > ord(h[j:j+1]):
            Taro += 3
            x = 1
            break
        if ord(t[j:j+1]) < ord(h[j:j+1]):
            Hanako += 3
            x = 1
            break
    if x == 0:
        if len(t) > len(h):
            Taro += 3
        elif len(t) < len(h):
            Hanako += 3
	

print("{} {}".format(Taro,Hanako))
Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
def main():
    N = int(input())
    Card = tuple(tuple(input().split()) for _ in range(N))

    taro = 0
    hanako = 0
    for c in Card:
        if c[0] > c[1]:
            taro += 3
        if c[0] < c[1]:
            hanako += 3
        else:
            taro += 1
            hanako += 1

    print(taro, hanako)

main()

Failing test case input:
3
ueb goe
eiri giuh
nojk rhget

Expected output:
3 6


Actual output:
4 7


Fixed submission (verdict: Accepted):
def main():
    N = int(input())
    Card = tuple(tuple(input().split()) for _ in range(N))

    taro = 0
    hanako = 0
    for c in Card:
        if c[0] > c[1]:
            taro += 3
        elif c[0] < c[1]:
            hanako += 3
        else:
            taro += 1
            hanako += 1

    print(taro, hanako)

main()

Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
import sys
n = int(input())
p_t = 0
p_h = 0

for i in range(n):
	taro, hanako = input().split()
	if taro == hanako:
		p_t += 1
		p_h += 1
	else:
		l_t = list(taro)
		l_h = list(hanako)
		for j in range(min(len(l_t), len(l_h))):
			if l_t[j] != l_h[j]:
				if ord(l_t[j])<ord(l_h[j]):
					p_h += 3
					print('taro')
					break
				else:
					p_t += 3
					print('hanako')
					break

print(p_t, p_h)

Failing test case input:
3
f`v gph
jrid giug
npjk rhetg

Expected output:
3 6


Actual output:
taro
hanako
taro
3 6


Fixed submission (verdict: Accepted):
import sys
n = int(input())
p_t = 0
p_h = 0

for i in range(n):
	taro, hanako = input().split()
	if taro == hanako:
		p_t += 1
		p_h += 1
	else:
		l_t = list(taro)
		l_h = list(hanako)
		for j in range(min(len(l_t), len(l_h))):
			if l_t[j] != l_h[j]:
				if ord(l_t[j])<ord(l_h[j]):
					p_h += 3
					
					break
				else:
					p_t += 3
					
					break
			else:
				if j == min(len(l_t), len(l_h))-1:
					if len(l_t)>len(l_h):
						p_t += 3
					else:
						p_h += 3
					

print(p_t, p_h)
Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())

t_score = 0
h_score = 0


for i in range(n):
 t, h = input().split()
 t_head = ord(t[0])
 h_head = ord(h[0])
 if t_head > h_head:
  t_score += 3
 elif t_head < h_head:
  h_score += 3
 elif t == h:
  if len(t) >= len(h):
   for j in range(len(h)):
    if ord(t[j]) > ord(h[j]):
     t_score += 3
     break
    elif ord(t[j]) < ord(h[j]):
     h_score += 3
     break
   else:
    t_score += 1
    h_score += 1

print("{0} {1}".format(t_score, h_score))

Failing test case input:
3
v`f ngg
jrhd jugf
knok hvtgf

Expected output:
6 3


Actual output:
6 0


Fixed submission (verdict: Accepted):
n = int(input())

t_score = 0
h_score = 0


for i in range(n):
 t, h = input().split()
 if t == h:
  t_score += 1
  h_score += 1
  continue
 if len(t) >= len(h):
  for j in range(len(h)):
   if ord(t[j]) > ord(h[j]):
    t_score += 3
    break
   elif ord(t[j]) < ord(h[j]):
    h_score += 3
    break
  else:
   t_score += 3
 elif len(t) < len(h):
   for j in range(len(t)):
    if ord(t[j]) > ord(h[j]):
     t_score += 3
     break
    elif ord(t[j]) < ord(h[j]):
     h_score += 3
     break
   else:
    h_score += 3

   
print("{0} {1}".format(t_score, h_score))

Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):



n = int(input())
turns = [input() for i in range(n)]

taro, hanako = 0, 0
for turn in turns:
    t, h = turn.split(' ')
    min_len = len(t) if len(t) <= len(h) else len(h)

    win_flag = 0 
    for i in range(min_len):
        if ord(t[i]) < ord(h[i]):
            win_flag = 1
        elif ord(h[i]) < ord(t[i]):
            win_flag = -1

    if win_flag == 0:
        if len(t) < len(h):
            win_flag = 1
        elif len(h) < len(t):
            win_flag = -1

    if win_flag == -1:
        taro += 3
    elif win_flag == 1:
        hanako += 3
    else:
        taro += 1
        hanako += 1

print(taro, hanako)


Failing test case input:
3
v`f ngg
jrhd jugf
knok hvtgf

Expected output:
6 3


Actual output:
3 6


Fixed submission (verdict: Accepted):



n = int(input())
turns = [input() for i in range(n)]

taro, hanako = 0, 0
for turn in turns:
    t, h = turn.split(' ')
    min_len = len(t) if len(t) <= len(h) else len(h)

    win_flag = 0 
    for i in range(min_len):
        if ord(t[i]) < ord(h[i]):
            win_flag = 1
            break
        elif ord(h[i]) < ord(t[i]):
            win_flag = -1
            break

    if win_flag == 0:
        if len(t) < len(h):
            win_flag = 1
        elif len(h) < len(t):
            win_flag = -1

    if win_flag == -1:
        taro += 3
    elif win_flag == 1:
        hanako += 3
    else:
        taro += 1
        hanako += 1

print(taro, hanako)
Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):


def numinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    SCORE_taro = 0
    SCORE_hanako = 0
    n = int(input())
    for i in range(n):
        words = input()
        if words[0] > words[1]: SCORE_taro += 3
        elif words[0] < words[1]: SCORE_hanako += 3
        else:
            SCORE_taro += 1; SCORE_hanako += 1
    print(str(SCORE_taro) + " " + str(SCORE_hanako))

if __name__ == "__main__":
    main()


Failing test case input:
3
`vf fmg
hrjd juhf
jonj huvgf

Expected output:
3 6


Actual output:
0 9


Fixed submission (verdict: Accepted):


def numinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    SCORE_taro = 0
    SCORE_hanako = 0
    n = int(input())
    for i in range(n):
        words = input().split()
        if words[0] > words[1]: SCORE_taro += 3
        elif words[0] < words[1]: SCORE_hanako += 3
        else:
            SCORE_taro += 1; SCORE_hanako += 1
    print(str(SCORE_taro) + " " + str(SCORE_hanako))

if __name__ == "__main__":
    main()

Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
def main():

    match_count = int(input())
    matches = [input().split() for i in range(match_count)]
    
    taro_result = [3 if match[0] > match[1] else 1 if match[0] == match[1] else 0 for match in matches]
    print('%d %d' % (sum(taro_result), sum(3 if item == 0 else 1 for item in taro_result)) )


main()

Failing test case input:
3
`ev hpg
jrid giug
npjk rhteg

Expected output:
3 6


Actual output:
3 7


Fixed submission (verdict: Accepted):
def main():

    match_count = int(input())
    matches = [input().split() for i in range(match_count)]
    
    taro_result = [3 if match[0] > match[1] else 1 if match[0] == match[1] else 0 for match in matches]
    print('%d %d' % (sum(taro_result), sum(3 if item == 0 else 1 if item == 1 else 0 for item in taro_result)) )


main()
Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())

score_taro, score_hanako = 0, 0
for _ in range(n):
    card_taro, card_hanako = input().split()

    point_taro, point_hanako = 0, 0
    if card_taro == card_hanako:
        point_taro = 1
        point_hanako = 1
        
        continue
    for i in range(min(len(card_taro), len(card_hanako))):
        if len(card_taro) > len(card_hanako):
            point_taro = 3
        else:
            point_hanako = 3
        if ord(card_taro[i:i+1]) > ord(card_hanako[i:i+1]):
            point_taro = 3
            break
        if ord(card_taro[i:i+1]) < ord(card_hanako[i:i+1]):
            point_hanako = 3
            break

    score_taro += point_taro
    score_hanako += point_hanako

print("{0} {1}".format(score_taro, score_hanako))

Failing test case input:
3
`vf fmg
hrjd kuhf
jnoj huvgf

Expected output:
3 6


Actual output:
3 9


Fixed submission (verdict: Accepted):
n = int(input())

score_taro, score_hanako = 0, 0
for _ in range(n):
    card_taro, card_hanako = input().split()

    point_taro = 0
    point_hanako = 0
    if card_taro == card_hanako:
        score_taro += 1
        score_hanako += 1
        continue
    for i in range(min(len(card_taro), len(card_hanako))):
        if len(card_taro) > len(card_hanako):
            point_taro = 3
        elif len(card_taro) < len(card_hanako):
            point_hanako = 3
        if ord(card_taro[i:i+1]) > ord(card_hanako[i:i+1]):
            point_taro = 3
            point_hanako = 0
            break
        if ord(card_taro[i:i+1]) < ord(card_hanako[i:i+1]):
            point_taro = 0
            point_hanako = 3
            break
    score_taro += point_taro
    score_hanako += point_hanako
print("{0} {1}".format(score_taro, score_hanako))

Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
import sys
n = int(input())
p_t = 0
p_h = 0

for i in range(n):
	taro, hanako = input().split()
	if taro == hanako:
		p_t += 1
		p_h += 1
	else:
		l_t = list(taro)
		l_h = (hanako)
		for j in range(min(len(l_t), len(l_h))):
			if l_t[j] != l_h[j]:
				if ord(l_t[j])<ord(l_h[j]):
					p_t += 3
					break
				else:
					p_h += 3
					break

print(p_t, p_h)

Failing test case input:
3
f`v hpg
jrhd giug
npjk rheug

Expected output:
3 6


Actual output:
6 3


Fixed submission (verdict: Accepted):
import sys
n = int(input())
p_t = 0
p_h = 0

for i in range(n):
	taro, hanako = input().split()
	if taro == hanako:
		p_t += 1
		p_h += 1
	else:
		l_t = list(taro)
		l_h = list(hanako)
		for j in range(min(len(l_t), len(l_h))):
			if l_t[j] != l_h[j]:
				if ord(l_t[j])<ord(l_h[j]):
					p_h += 3
					
					break
				else:
					p_t += 3
					
					break
			else:
				if j == min(len(l_t), len(l_h))-1:
					if len(l_t)>len(l_h):
						p_t += 3
					else:
						p_h += 3
					

print(p_t, p_h)
Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
t=int(input())
taro=0
hanako=0
for i in range(t):
    S=input().split()
    if S[0]==S[1]:
        taro+=1
        hanako+=1
    elif S==S.sort():
        taro+=3
    elif S!=S.sort():
        hanako+=3
print(taro,hanako)

Failing test case input:
3
v`f fmg
jrhd juhf
jonj huvgf

Expected output:
6 3


Actual output:
0 9


Fixed submission (verdict: Accepted):
t=int(input())
taro=0
hanako=0
for i in range(t):
    S=input().split()

    if S[0]==S[1]:
        taro+=1
        hanako+=1
    elif S[0]>S[1]:
        taro+=3
    else:
        hanako+=3
print(taro,hanako)

Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
T = H = 0
for x in range(n):
    t, h = input().split()
    tl = list(t)
    hl = list(h)
    z = min([int(len(tl)),int(len(hl))])
    for k in range(z):
        if ord(tl[k]) > ord(hl[k]):
            T += 3
            break
        elif ord(tl[k]) == ord(hl[k]):
            pass
        else:
            H += 3
            break
    else:
        if len(hl) == len(tl):
            T += 1
            H += 1
        elif z == len(tl):
            H += 3
        else:
            T += 3
    print(f"{str(T)} {str(H)}")
print(f"{str(T)} {str(H)}")





Failing test case input:
3
act eog
fish gith
lion tiger

Expected output:
0 9


Actual output:
0 3
0 6
0 9
0 9


Fixed submission (verdict: Accepted):
n = int(input())
T = H = 0
for x in range(n):
    t, h = input().split()
    tl = list(t)
    hl = list(h)
    z = min([int(len(tl)),int(len(hl))])
    for k in range(z):
        if ord(tl[k]) > ord(hl[k]):
            T += 3
            break
        elif ord(tl[k]) == ord(hl[k]):
            pass
        else:
            H += 3
            break
    else:
        if len(hl) == len(tl):
            T += 1
            H += 1
        elif z == len(tl):
            H += 3
        else:
            T += 3
print(f"{str(T)} {str(H)}")

Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())

score = [0, 0]
for i in range(n):
    c = input().split()
    if c[0] == c[1]:
        score = list(map(lambda x: x+1, score))
    elif c[0] > c[0]:
        score[1] += 3
    else:
        score[0] += 3

print(*score)

Failing test case input:
3
v`f gmg
hrjd jugf
konj hvtgf

Expected output:
6 3


Actual output:
9 0


Fixed submission (verdict: Accepted):
n = int(input())

score = [0, 0]
for i in range(n):
    c = input().split()
    if c[0] == c[1]:
        score[0] += 1
        score[1] += 1
    elif c[0] < c[1]:
        score[1] += 3
    else:
        score[0] += 3

print(*score)
Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
round = int(input())
points =[0, 0]
for r in range(round):
    taro, hanako = input().split(" ")
    if taro[0] == hanako[0]:
        points[0] += 1
        points[1] += 1
    elif taro[0] > hanako[0]:
        points[0] += 3
    elif taro[0] < hanako[0]:
        points[1] += 3

print(*points)

Failing test case input:
3
v`f fmg
jrhd juhf
jonj huvgf

Expected output:
6 3


Actual output:
7 1


Fixed submission (verdict: Accepted):
round = int(input())
points =[0, 0]
for r in range(round):
    taro, hanako = input().split(" ")
    if taro == hanako:
        points[0] += 1
        points[1] += 1
    elif taro > hanako:
        points[0] += 3
    elif taro < hanako:
        points[1] += 3

print(*points)

Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
st, sh = 0, 0
for i in range(n):
    t, h = map(str, input().split())
    if ord(t[0]) > ord(h[0]):
        st += 3
    elif ord(t[0]) == ord(h[0]):
        st += 1
        sh += 1
    else:
        sh += 3
print(st, sh)

Failing test case input:
3
fv` emg
jhrc jfhu
jonj hfvgu

Expected output:
9 0


Actual output:
7 1


Fixed submission (verdict: Accepted):
n = int(input())
st, sh = 0, 0
for i in range(n):
    t, h = map(str, input().split())
    if t > h:
        st += 3
    elif t < h:
        sh += 3
    else:
        st += 1
        sh += 1
print(st, sh)

Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
num = int(input())

t=0
h=0

for i in range(num):
	Ta,Ha = input().split(" ")
	if Ta[:1] > Ha[:1]:
		t += 3
	elif  Ta[:1] < Ha[:1]:
		h += 3
	else:
		t += 1
		h += 1
print(t,h)



Failing test case input:
3
v`f ggn
jrhd jguf
jnok ehrug

Expected output:
9 0


Actual output:
7 1


Fixed submission (verdict: Accepted):
num = int(input())

t=0
h=0

for i in range(num):
	Ta,Ha = input().split(" ")
	if Ta > Ha:
		t += 3
	elif  Ta < Ha:
		h += 3
	else:
		t += 1
		h += 1
print(t,h)

Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
score = [0,0]
for _ in range(n):
    tc, hc = input().split()
    tc = ord(tc[0])
    hc = ord(hc[0])
    if tc == hc:
        score[0] += 1
        score[1] += 1
    elif tc > hc:
        score[0] += 3
    else:
        score[1] += 3
print(*score)


Failing test case input:
3
v`f ngg
jrhd jguf
jnok hvtgf

Expected output:
9 0


Actual output:
7 1


Fixed submission (verdict: Accepted):
n = int(input())
score = [0,0]
for _ in range(n):
    tc, hc = input().split()
    if tc == hc:
        score[0] += 1
        score[1] += 1
    elif tc > hc:
        score[0] += 3
    else:
        score[1] += 3
print(*score)
Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
t,h=0,0
n=int(input())
for i in range(n):
    a,b=input().split()
    if a > b:
        h+=3
    elif a < b:
        t+=3
    else:
         t+=1
         h+=1
print(t, h)

Failing test case input:
3
f`v gpg
jrhd igug
nojk rheug

Expected output:
3 6


Actual output:
6 3


Fixed submission (verdict: Accepted):
t,h=0,0
n=int(input())
for i in range(n):
    a,b=input().split()
    if a > b:
        t+=3
    elif a < b:
        h+=3
    else:
         t+=1
         h+=1
print(t, h)

Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
point = [0,0]
for i in range(int(input())):
    (t,h) = [x for x in input().split()]
    if t == h:
        point[0] += 1
        point[1] += 1
    else:
        a = [t,h]
        sorted(a)
        if t == a[1]:
            point[0] += 3
        else:
            point[1] += 3
print(point[0],point[1])

Failing test case input:
3
fv` emg
jhrc jfhu
jonj hfvgu

Expected output:
9 0


Actual output:
0 9


Fixed submission (verdict: Accepted):
point = [0,0]
for i in range(int(input())):
    (t,h) = [x for x in input().split()]
    if t == h:
        point[0] += 1
        point[1] += 1
    else:
        a = [t,h]
        q = sorted(a)
        if t == q[0]:
            point[1] += 3
        else:
            point[0] += 3
print(point[0],point[1])

Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
taro = 0
hanako = 0
n = int(input())
for _ in range(n):
    taro_card, hanako_card = input().split()
    if taro_card > hanako_card:
        taro += 3
    elif taro_card < hanako_card:
        hanako += 3
    else:
        taro += 1
        hanako += 1
    print(taro, hanako)
print(taro, hanako)

Failing test case input:
3
ueb goe
eiri giuh
nojk rhget

Expected output:
3 6


Actual output:
3 0
3 3
3 6
3 6


Fixed submission (verdict: Accepted):
taro = 0
hanako = 0
n = int(input())
for _ in range(n):
    taro_card, hanako_card = input().split()
    if taro_card > hanako_card:
        taro += 3
    elif taro_card < hanako_card:
        hanako += 3
    else:
        taro += 1
        hanako += 1
print(taro, hanako)

Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):


n = int(input())

tScore = 0
hScore = 0

for i in range(n):
    T, H = input().split()
    if T == H:
        tScore += 1
        hScore += 1
    elif T > H:
        hScore +=3
    elif H > T:
        tScore += 3
print("%d %d" % (tScore, hScore))

Failing test case input:
3
v`f ngg
jrhd jguf
jnok hvtgf

Expected output:
9 0


Actual output:
0 9


Fixed submission (verdict: Accepted):


n = int(input())

tScore = 0
hScore = 0

for i in range(n):
    T, H = input().split()
    if T == H:
        tScore += 1
        hScore += 1
    elif T > H:
        tScore += 3
    elif H > T:
        hScore +=3
print("%d %d" % (tScore, hScore))
Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
taro=0
hanako=0
for i in range(n):
	x,y=input().split()
	
	if x[0]>y[0]:
		taro += 3
	elif x[0]==y[0]:
		taro +=1
		hanako +=1
	else:
		hanako +=3
print(taro,hanako)

Failing test case input:
3
v`f ngg
jrhd jguf
jnok fhtug

Expected output:
9 0


Actual output:
7 1


Fixed submission (verdict: Accepted):
n = int(input())
taro=0
hanako=0
for i in range(n):
	A=list(map(str,input().split()))
	if A[0]==A[1]:
		taro +=1
		hanako +=1
	else:
		B=sorted(A)
		if A == B:
			hanako+=3
		else:
			taro+=3
print(taro,hanako)

Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
point_a,point_b = 0,0
for i in range(int(input())):
	k =[]
	a,b = input().split()
	k = [[i,j] for i,j in zip(a,b) if i != j]
	if k == []:
		if len(a) < len(b):
			point_b+=3
		elif len(a) > len(b):
			point_a += 3
		else:
			point_a+=1
			point_b+=1
	elif ord(k[0][0]) < ord(k[0][1]):
		point_b += 3
	else :
		point_a += 3
	print(point_a,point_b)
print(point_a,point_b)

Failing test case input:
3
f`v hpg
jrhd giug
npjk rheug

Expected output:
3 6


Actual output:
0 3
3 3
3 6
3 6


Fixed submission (verdict: Accepted):
point_a,point_b = 0,0
for i in range(int(input())):
	k =[]
	a,b = input().split()
	k = [[i,j] for i,j in zip(a,b) if i != j]
	if k == []:
		if len(a) < len(b):
			point_b+=3
		elif len(a) > len(b):
			point_a += 3
		else:
			point_a+=1
			point_b+=1
	elif ord(k[0][0]) < ord(k[0][1]):
		point_b += 3
	else :
		point_a += 3
print(point_a,point_b)

Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())

tarou = 0
hanako = 0

for x in range(n):
    if hanako > tarou:
        hanako += 3
    elif tarou > hanako:
        tarou += 3
    else:
        tarou += 1
        hanako += 1

print("{0} {1}".format(tarou, hanako))

Failing test case input:
3
act goe
fish gith
lion tiger

Expected output:
0 9


Actual output:
3 3


Fixed submission (verdict: Accepted):
i = int(input())

tarou = 0
hanako = 0

for x in range(i):
    a,b = input().split()
    if b > a:
        hanako += 3
    elif a > b:
        tarou += 3
    else:
        hanako += 1
        tarou += 1
print("{0} {1}".format(tarou, hanako))
Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())

t_score = 0
h_score = 0


for i in range(n):
 t, h = input().split()
 if len(t) >= len(h):
  for j in range(len(h)):
   if ord(t[j]) < ord(h[j]):
    t_score += 3
    break
   elif ord(t[j]) > ord(h[j]):
    h_score += 3
    break
  else:
   t_score += 1
   h_score += 1
 elif len(t) < len(h):
   for j in range(len(t)):
    if ord(t[j]) < ord(h[j]):
     t_score += 3
     break
    elif ord(t[j]) > ord(h[j]):
     h_score += 3
     break
   else:
    t_score += 1
    h_score += 1
   
print("{0} {1}".format(t_score, h_score))

Failing test case input:
3
`vf emg
jhrc kfhu
jnoj hfvgu

Expected output:
3 6


Actual output:
6 3


Fixed submission (verdict: Accepted):
n = int(input())

t_score = 0
h_score = 0


for i in range(n):
 t, h = input().split()
 if t == h:
  t_score += 1
  h_score += 1
  continue
 if len(t) >= len(h):
  for j in range(len(h)):
   if ord(t[j]) > ord(h[j]):
    t_score += 3
    break
   elif ord(t[j]) < ord(h[j]):
    h_score += 3
    break
  else:
   t_score += 3
 elif len(t) < len(h):
   for j in range(len(t)):
    if ord(t[j]) > ord(h[j]):
     t_score += 3
     break
    elif ord(t[j]) < ord(h[j]):
     h_score += 3
     break
   else:
    h_score += 3

   
print("{0} {1}".format(t_score, h_score))

Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())

t_score = 0
h_score = 0


for i in range(n):
 t, h = input().split()
 if t == h:
  t_score += 1
  h_score += 1
  continue
 if len(t) > len(h):
  for j in range(len(h)):
   if ord(t[j]) > ord(h[j]):
    t_score += 3
    break
   elif ord(t[j]) < ord(h[j]):
    h_score += 3
    break
  else:
   h_score += 3
 elif len(t) < len(h):
   for j in range(len(t)):
    if ord(t[j]) > ord(h[j]):
     t_score += 3
     break
    elif ord(t[j]) < ord(h[j]):
     h_score += 3
     break
   else:
    t_score += 3

   
print("{0} {1}".format(t_score, h_score))

Failing test case input:
3
act goe
fish gith
lion tiger

Expected output:
0 9


Actual output:
0 3


Fixed submission (verdict: Accepted):
n = int(input())

t_score = 0
h_score = 0


for i in range(n):
 t, h = input().split()
 if t == h:
  t_score += 1
  h_score += 1
  continue
 if len(t) >= len(h):
  for j in range(len(h)):
   if ord(t[j]) > ord(h[j]):
    t_score += 3
    break
   elif ord(t[j]) < ord(h[j]):
    h_score += 3
    break
  else:
   t_score += 3
 elif len(t) < len(h):
   for j in range(len(t)):
    if ord(t[j]) > ord(h[j]):
     t_score += 3
     break
    elif ord(t[j]) < ord(h[j]):
     h_score += 3
     break
   else:
    h_score += 3

   
print("{0} {1}".format(t_score, h_score))
Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
st, sh = 0, 0
for i in range(n):
    t, h = map(str, input().split())
    if t > h:
        st += 3
    elif t < h:
        sh += 3
    else:
        st += 1
        st += 1
print(st, sh)

Failing test case input:
3
cat dog
fish fish
lion tiger

Expected output:
1 7

Actual output:
2 6


Fixed submission (verdict: Accepted):
n = int(input())
st, sh = 0, 0
for i in range(n):
    t, h = map(str, input().split())
    if t > h:
        st += 3
    elif t < h:
        sh += 3
    else:
        st += 1
        sh += 1
print(st, sh)

Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
taro = 0
hanako = 0
n = int(input())
for _ in range(n):
    taro_card, hanako_card = input().split()
    if taro_card > hanako_card:
        taro += 3
    if taro_card < hanako_card:
        hanako += 3
    else:
        taro += 1
        hanako += 1
print(taro, hanako)

Failing test case input:
3
`fv hpg
jrid giug
npjk rhteg

Expected output:
3 6


Actual output:
4 7


Fixed submission (verdict: Accepted):
taro = 0
hanako = 0
n = int(input())
for _ in range(n):
    taro_card, hanako_card = input().split()
    if taro_card > hanako_card:
        taro += 3
    elif taro_card < hanako_card:
        hanako += 3
    else:
        taro += 1
        hanako += 1
print(taro, hanako)

Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
tarou = 0
hanako = 0
for x in range(n):
    if hanako > tarou:
        hanako += 3
    elif tarou > hanako:
        tarou += 3
    else:
        tarou += 1
        hanako += 1
print("{0} {1}".format(tarou, hanako))

Failing test case input:
3
`vf fmg
hrjd kuhf
jnoj huvgf

Expected output:
3 6


Actual output:
3 3


Fixed submission (verdict: Accepted):
i = int(input())

tarou = 0
hanako = 0

for x in range(i):
    a,b = input().split()
    if b > a:
        hanako += 3
    elif a > b:
        tarou += 3
    else:
        hanako += 1
        tarou += 1
print("{0} {1}".format(tarou, hanako))

Problem: p02421
Buggy submission (Python3, verdict: Wrong Answer):


n = int(input())
point_t = 0
point_h = 0

for i in range(n):
    cards = list(map(str, input().split()))
    taro = cards[0]
    hanako = cards[1]
    if taro > hanako:
        point_h += 3
    elif taro < hanako:
        point_t += 3
    else:
        point_t += 1
        point_h += 1

print(point_t, point_h)


Failing test case input:
3
fv` emg
jhrc kfhu
jonj hfvgu

Expected output:
6 3


Actual output:
3 6


Fixed submission (verdict: Accepted):


n = int(input())
point_t = 0
point_h = 0

for i in range(n):
    cards = list(map(str, input().split()))
    taro = cards[0]
    hanako = cards[1]
    if taro < hanako:
        point_h += 3
    elif taro > hanako:
        point_t += 3
    else:
        point_t += 1
        point_h += 1

print(point_t, point_h)
Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = input()
if len(set(n)) <= 2:
  print('Yes')
else:
  print('No')



Failing test case input:
282

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
s = input()
if len(set(s[1:])) == 1 or len(set(s[:3])) == 1:
  print('Yes')
else:
  print('No')

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(map(int,list(input())))
count = 1
check = False
for i in range(len(a)-1):
    if a[i] == a[i+1]:
        count += 1
        if count==3:
            check = True
    else:
        count = 1
print ('yes' if check==True else 'No')

Failing test case input:
1118

Expected output:
Yes

Actual output:
yes


Fixed submission (verdict: Accepted):
a = list(map(int,list(input())))
count = 1
check = False
for i in range(len(a)-1):
    if a[i] == a[i+1]:
        count += 1
        if count==3:
            check = True
    else:
        count = 1
print ('Yes' if check==True else 'No')

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = input()
if a[1]==a[2]:
    if a[0] == a[1] or a[2]==a[3]:
        print("Yes")
else: 
    print("No")


Failing test case input:
8004

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
a = input()
if a[1] == a[2] and (a[0] == a[1] or a[2]==a[3]):
    print("Yes")
else: 
    print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=int(input())
print(any([str(i)*3 in str(s) for i in range(10)]))

Failing test case input:
756

Expected output:
No


Actual output:
False


Fixed submission (verdict: Accepted):

s=int(input())
print("Yes" if any([str(i)*3 in str(s) for i in range(10)]) else "No" )

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    N = input()
    print(longest(N))

def longest(seq):
    max_count = 0
    prev_char = None

    for current in seq:
        if prev_char != current:
            count = 1
        else:
            count += 1
        if count > max_count:
            max_count = count
        prev_char = current

    return max_count

main()


Failing test case input:
2324

Expected output:
No


Actual output:
1


Fixed submission (verdict: Accepted):
def main():
    N = input()

    if longest(N) >= 3:
        print('Yes')
    else:
        print('No')

def longest(seq):
    max_count = 0
    prev_char = None

    for current in seq:
        if prev_char != current:
            count = 1
        else:
            count += 1
        if count > max_count:
            max_count = count
        prev_char = current

    return max_count

main()

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=n
b=n
d=n%10
c=n%100-d
if a==b and b==c:
    print("Yes")
elif b==c and c==d:
    print("Yes")
else:
    print("No")


Failing test case input:
7777

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
n=int(input())
a=n
b=(n
d=n%10
c=((n%100)-d)
if a==b and b==c:
    print("Yes")
elif b==c and c==d:
    print("Yes")
else:
    print("No")