Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p02687 (python)

Fixed submission:
a = input()
 
if a == "ABC":
  print("ARC")
if a == "ARC":
  print("ABC")

Buggy submission (verdict: Runtime Error):
lis = input().split()
N = int(lis[0])
M = int(lis[1])
H = input().split()
T = list(range(N+1))

for i in range(M):
    R = input().split()
    r1 = int(R[0])-1
    r2 = int(R[1])-1
    #print("r1=",r1,"r2=",r2)
    if int(H[r1]) >= int(H[r2]):
        if int(r2+1) in T:
            T.remove(int(r2+1))
    if int(H[r1]) < int(H[r2]):
        if int(r1+1) in T:
            T.remove(int(r1+1))

print(len(T) - 1)

Buggy submission (verdict: Runtime Error):
a = input()

if a == ABC:
  print("ARC")
else:
  print("ARC")
Problem p02706 (python)

Fixed submission:
a = input().split()

N = int(a[0])


c = input().split()



d = 0
  
for i in c:
  d += int(i)

if d > N:
  print(-1)
else:
  print(N-d)

Buggy submission (verdict: Runtime Error):
a = input().split()

N = int(a[0])
M = int(a[1])


b = 0
c = []

while True:
  if b >= M:
  	break
  e = int(input())
  c.append(e)
  b += 1

d = 0
  
for i in c:
  d += int(i)

if d > N:
  print(-1)
else:
  print(N-d)

Buggy submission (verdict: Runtime Error):
a = input().split()

N = int(a[0])
M = int(a[1])

b = 0
c = []

while True:
  if b >= M:
  	break
  e = input(int())
  c.append(e)
  b += 1

d = 0
  
for i in c:
  d += int(i)

if d > N:
  print(-1)
else:
  print(N-d)

Buggy submission (verdict: Runtime Error):
a = input().split()

N = int(a[0])
M = int(a[1])

print(N)
print(M)

b = 0
c = []

while True:
  if b >= M:
  	break
  e = input(int())
  c.append(e)
  b += 1

d = 0
  
for i in c:
  d += int(i)

if d > N:
  print(-1)
else:
  print(N-d)

Buggy submission (verdict: Runtime Error):
a = int().input()

N = a[0]
M = a[1]

b = 0
c = []

while true:
  if b > M:
  	break
  e = input(int())
  c.append(e)
  b += 1

d = 0
  
for i in c:
  d += i

if d > N:
  print(-1)
else:
  print(N-d)
Problem p02724 (python)

Fixed submission:
X=input()
y=int(X)
z=0
while y>=500:
   y-=500
   z+=1
a=0
while y>=5:
    y-=5
    a+=1
   
result=z*1000+a*5
str_result=str(result)
print(str_result)

Buggy submission (verdict: Runtime Error):
X=input()
y=int(X)
while y<1000:
  y-=1000
  z+=1
result=z*2+y*1
str_result=str(result)
print('str_result')
Problem p03455 (python)

Fixed submission:
a, b = map(int, input().split())
if a*b%2==0:
  print('Even')
else:
  print('Odd')

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
if (a*b)%2==0:
  print('Even')
else:
  print('Odd')

Buggy submission (verdict: Runtime Error):
a=input()
b=input()
if (a*b)%2==0:
  print('Even')
else:
  print('Odd')

Buggy submission (verdict: Runtime Error):
a=input()
b=input()
if a*b%2==0:
  print('Even')
else:
  print('Odd')
Problem p03493 (python)

Fixed submission:
s=list(input())
print(s.count("1"))

Buggy submission (verdict: Runtime Error):
s=list(input())
print(List.count("1"))
Problem p02789 (python)

Fixed submission:
input_str =  input().split()
N = int(input_str[0])
M = int(input_str[1])

if N == M:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N,M = int(a) for a in input().split()
print(N)
print(M)
Problem p02691 (python)

Fixed submission:
from collections import defaultdict
n = int(input())
a = list(map(int,input().split()))
b = [0]*n
for i in range(n):
    b[i]= i-a[0]-a[i]
d = defaultdict(int)
for i in range(1,n):
    d[b[i]] += 1
ans = 0
x = 0
for i in range(n-1):
    ans+=d[x]
    d[b[i+1]]-=1
    x -= -1+(a[i]-a[i+1])
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
b = [0]*n
for i in range(n):
    b[i]= i-a[0]-a[i]
d = defaultdict(int)
for i in range(1,n):
    d[b[i]] += 1
ans = 0
x = 0
for i in range(n-1):
    ans+=d[x]
    d[b[i+1]]-=1
    x -= -1+(a[i]-a[i+1])
print(ans)
Problem p02801 (python)

Fixed submission:

C = str(input())

print(chr(ord(C) + 1))

Buggy submission (verdict: Runtime Error):
from sys import stdin
lines = stdin.readlines()
 
C = str(lines[0])
 
print(chr(ord(C) + 1))

Buggy submission (verdict: Runtime Error):
from sys import stdin
lines = stdin.readlines()
 
C = str(lines[0])
 
print(chr(ord(C) + 1))

Buggy submission (verdict: Runtime Error):
from sys import stdin
lines = stdin.readlines()
 
C = lines[0]

print(chr(ord(C) + 1))
Problem p02909 (python)

Fixed submission:
s = input()
if s=='Sunny':
  print('Cloudy')
elif s=='Rainy':
  print('Sunny')
else:
  print('Rainy')

Buggy submission (verdict: Runtime Error):
import sys
if argv[1] == 'Sunny':
  echo "Cloudy"
elif argv[1] == 'Cloudy':
  echo "Rainy"
elif argv[1] == 'Rainy' :
  echo "Sunny"
else:
Problem p02706 (python)

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

print(max(N - sum(A), -1))

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
A = list(map(int, input().split())

print(max(N - sum(A), - 1))
Problem p02717 (python)

Fixed submission:
A,B,C=input().split()
temp=A
A=B
B=temp

temp=A
A=C
C=temp

print(A,B,C)

Buggy submission (verdict: Runtime Error):
temp=A
A=B
B=temp

temp=A
A=C
C=temp

print(A,B,C)
Problem p02687 (python)

Fixed submission:
c = input()
print("ABC" if c == "ARC" else "ARC")

Buggy submission (verdict: Runtime Error):
X = int(input())

a = [int( i/2)*((-1)**i) for i in range(1, 1000)]
b = [int( i/2)*((-1)**i) for i in range(1, 1000)]

"""
* Aが正ならBは負または、Aより小さい正
* Aが負ならBは負
* X/(a+b)は、1以上の整数
"""

find = False
if X == 0:
  print(0)
else:  
  for a_ in a:
    for b_ in b:
      if a_ + b_ == 0:
        continue
      if a_ >= 0:
        if b_ >= 0 or b_ > a_:
          continue
      if a_ < 0:
        if b_ >= 0:
          continue
        
      if X%(a_+b_) != 0:
        continue
      
      if (a_**5) - (b_**5) == X:
        print(f"{a_} {b_}")
        find = True
        break
    if find:
      break

Buggy submission (verdict: Runtime Error):
X = int(input())

a = [int( i/2)*((-1)**i) for i in range(1, 10000)]
b = [int( i/2)*((-1)**i) for i in range(1, 10000)]

"""
* Aが正ならBは負または、Aより小さい正
* Aが負ならBは負
* X/(a+b)は、1以上の整数
"""

find = False
if X == 0:
  print(0)
else:  
  for a_ in a:
    for b_ in b:
      if a_ + b_ == 0:
        continue
      if a_ >= 0:
        if b_ >= 0 or b_ > a_:
          continue
      if a_ < 0:
        if b_ >= 0:
          continue
        
      if X%(a_+b_) != 0:
        continue
      
      if (a_**5) - (b_**5) == X:
        print(f"{a_} {b_}")
        find = True
        break
    if find:
      break
Problem p04043 (python)

Fixed submission:
abc = list(map(int,input().split()))
print("YES" if sum(abc) == 17 and abc.count(5) else "NO")

Buggy submission (verdict: Runtime Error):
a = list(map(int, input().split()))
strs=[]
for i in range(a[0]):
    strs.append(input())
print("".join(sorted(strs)))

Buggy submission (verdict: Runtime Error):
a = list(map(int, input().split()))
strs=[]
for i in range(a[0]):
	strs.append(input())
print("".join(sorted(strs)))

Buggy submission (verdict: Runtime Error):
a = list(map(int, input().split()))
strs=[]
for i in range(a[0]):
	strs.push(input())
print("".join(sorted(strs)))

Buggy submission (verdict: Runtime Error):
n, l = map(int, input().split())
strs=[]
for i in range(n):
	strs.push(input())
print("".join(sorted(strs)))

Buggy submission (verdict: Runtime Error):
abc = map(int,input().split())
print("YES" if sum(abc) == 17 and abc.count(5) else "NO")

Buggy submission (verdict: Runtime Error):
abc = map(int,input().split())
"YES" if sum(abc) == 17 and abc.count(5) else "NO"
Problem p02687 (python)

Fixed submission:
s=input()
if s=="ABC":
  print("ARC")
else:
  print("ABC")

Buggy submission (verdict: Runtime Error):
x=int(input())
for i in range(-1000,1000):
  for j in range(-1000,1000):
    if i**5-j**5==x:
      print(i,j)
      exit()
Problem p02705 (python)

Fixed submission:
n=int(input())
print(3.1415926*n*2)

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
a=[0]*200099
for i in range(200099):
  a[i]=i
s=1
for i in range(n,k-1,-1):
  s+=sum(a[i:n+1])-sum(a[0:n-i+1])+1
print(s)
Problem p02802 (python)

Fixed submission:
N,M = map(int, input().split())
ac = [0]*N
wa = [0]*N
for i in range(M):
	p,s = input().split()
	if s == 'AC':
		if ac[int(p) - 1] != 0:
			continue
		else:	
			ac[int(p) - 1] = 1
	else:
		if ac[int(p) - 1] != 0:
			continue
		else:
			wa[int(p) - 1] += 1
AC,WA = 0,0

for i in range(N):
  AC += ac[i]
  if ac[i] >= 1:
    WA += wa[i]
print(AC,WA)

Buggy submission (verdict: Runtime Error):
    N,M = map(int, input().split())
	ac = [0]*N
	wa = [0]*N
	for i in range(M):
		p,s = input().split()
		if s == 'AC':
			if ac[int(p) - 1] != 0:
				continue
			else:	
				ac[int(p) - 1] = 1
		else:
			if ac[int(p) - 1] != 0:
				continue
			else:
				wa[int(p) - 1] += 1
	AC,WA = 0,0

	for i in range(N):
		AC += ac[i]
		if ac[i] >= 1:
			WA += wa[i]
	print(AC,WA)
Problem p03001 (python)

Fixed submission:
w,h,x,y=map(int,input().split())
if 2*x==w and 2*y==h:
  q=1
else:
  q=0
p=[w*h/2,q]
print(*p)

Buggy submission (verdict: Runtime Error):
w,h,x,y=map(int,input().split())
if 2*x==w and 2*y==h:
  q=1
else:
  q==0
p=[max(min(x*h,(w-x)*h),(min(y*w,(h-y)*w))),q]
print(*p)
Problem p03285 (python)

Fixed submission:
n = int(input())
a=int(n/4)+1
b=int(n/7)+1
ans=0
for i in range(a+1):
  for j in range(b+1):
    if 4*i+7*j==n:
      ans+=1
if ans==0:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
n = int(input())
a=int(n/4)+1
b=int(n/7)+1
ans=0
for i in range(a+1):
  for j in range(b+1):
    if 4*i+7*j=n:
      ans+=1
if ans==0:
  print("No")
else:
  print("Yes")
Problem p03611 (python)

Fixed submission:
N=int(input())
a=list(map(int,input().split()))
M=max(a)
m=min(a)
x=[0]*(M-m+3)
for i in a:
  x[i-m]+=1
  x[i-m+1]+=1
  x[i-m+2]+=1
print(max(x))

Buggy submission (verdict: Runtime Error):
N=int(input())
a=list(map(int,input().split()))
m=max(a)
mm=min(a)
p=[0]*(m-mm)

if 1<=len(a)<=3:
  print(len(a))
else:
  for i in range(mm,m-1):
    p[i]=a.count(i)+a.count(i+1)+a.count(i+2)
  print(max(p))

Buggy submission (verdict: Runtime Error):
N=int(input())
a=list(map(int,input().split()))
m=max(a)
mm=min(a)
p=[0]*(m-mm)

if 1<=len(a)<=3:
  print(len(a))
else:
  for i in range(mm,m-1):
    p[i]=a.count(i)+a.count(i+1)+a.count(i+2)
  print(max(p))

Buggy submission (verdict: Runtime Error):
N=int(input())
a=list(map(int,input().split()))
m=max(a)
mm=min(a)
p=[0]*(m-mm)

for i in range(mm,m-1):
  p[i]=a.count(i)+a.count(i+1)+a.count(i+2)
  
print(max(p))

Buggy submission (verdict: Runtime Error):
N=int(input())
a=list(map(int,input().split()))
m=max(a)
p=[0]*(m-1)

for i in range(m-1):
  p[i]=a.count(i)+a.count(i+1)+a.count(i+2)
  
print(max(p))
Problem p03624 (python)

Fixed submission:
S=set(input())
A={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"}
D=sorted(list(A-S))
if len(D)==0:
  print("None")
else:
  print(D[0])

Buggy submission (verdict: Runtime Error):
S=set(input())
A={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"}
D=sorted(list(A-S))
print(D[0])
Problem p03627 (python)

Fixed submission:
n=int(input())
a=sorted((list(map(int,input().split()))),reverse=True)
con=1
sta=a[0]
check=0
for i in range(1,n):
  if a[i]==sta:
    con+=1
    if con==2:
      check+=1
      x=sta
      a.remove(sta)
      a.remove(sta)
      break
  else:
    con=1
    sta=a[i]
sta=a[0]
con=1
for i in range(1,n-2):
  if a[i]==sta:
    con+=1
    if con==2:
      check+=1
      y=sta
      break
  else:
    con=1
    sta=a[i]
print(x*y if check==2 else "0")

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
a.sort(reverse=True)
b=-1
ans=[]
for ai in a:
  if len(ans)==2:
    break
  if b==ai:
    ans.append(ai)
    b=-1
  else:
    b=ai
print(ans[0]*ans[1])
Problem p03773 (python)

Fixed submission:
a,b=map(int,input().split())
if a+b<24:
  print(a+b)
else:
  print(a+b-24)

Buggy submission (verdict: Runtime Error):
import math

P=[]
n=int(input())
N=int(math.sqrt(n))

for i in range(1,n+1):
  if n%i==0:
    p=max(len(str(i)),len(str(int(n/i))))
    P.append(p)
    
print(min(P))
Problem p03943 (python)

Fixed submission:
a,b,c = map(int,input().split())
d = a/2 + b/2 + c/2
if d == a or d == b or d == c:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
d = a/3 + b/3 + c/3
if d == a or d == b or d == c:
  print(Yes)
else:
  print(No)
Problem p03962 (python)

Fixed submission:
a,b,c = map(int,input().split())
if a==b and b==c:
  print(1)
elif a==b or b==c or a==c:
  print(2)
else:
  print(3)

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
if a = b and b = c:
  print(1)
elif a = b or b = c or a = c:
  print(2)
else:
  print(3)

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
if a=b and b=c:
  print(1)
elif a=b or b=c or a=c:
  print(2)
else:
  print(3)

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
if a=b and b=c:
  print(1)
elif (a=b or b=c or a=c):
  print(2)
else:
  print(3)

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
if a=b=c:
  print(1)
elif (a=b or b=c or a=c):
  print(2)
else:
  print(3)

Buggy submission (verdict: Runtime Error):
a,b,c = map(int.input().split())
if a=b and b=c:
  print(1)
elif (a=b or b=c or a=c):
  print(2)
else:
  print(3)

Buggy submission (verdict: Runtime Error):
a,b,c = map(int.input().split())
if a=b=c:
  print(1)
elif (a=b or b=c or a=c):
  print(2)
else:
  print(3)

Buggy submission (verdict: Runtime Error):
a,b,c = int(input().split())
if a=b=c:
  print(1)
elif (a=b or b=c or a=c):
  print(2)
else:
  print(3)
Problem p02687 (python)

Fixed submission:
s=str(input())
if s=='ABC':
  print('ARC')
  
elif s=='ARC':
  print('ABC')
  
else:
  pass

Buggy submission (verdict: Runtime Error):
s=int(input())
if s=='ABC':
  print("ABC")
  
elif s=='ARC':
  print("ARC")

else:
  pass
Problem p02713 (python)

Fixed submission:
import sys
import numpy as np

from math import gcd

N = int(sys.stdin.readline())
ans = 0
"""
dp = np.zeros((N+1, N+1))
def gcd(a, b):
    if a < b:
        a, b = b, a
    
    if dp[a][b] != 0:
        return dp[a][b]

    while b>0:
        a, b = b, a % b
    
    dp[a][b] = a
    return a
"""
for i in range(1,N+1):
    for j in range(1,N+1):
        temp = gcd(i, j)
        for k in range(1,N+1):
            ans += gcd(temp, k)
            
print(ans)

Buggy submission (verdict: Runtime Error):
from math import gcd

def solv():
    n = int(input())
    ans = 0
    for i in range(1, n + 1):
        for j in range(1, n + 1):
            a = gcd(i, j)
            for k in range(1, n + 1):
                ans += gcd(a, k)
    print(ans)

solve()
Problem p02921 (python)

Fixed submission:
import sys

A = sys.stdin.readline()
B = sys.stdin.readline()
ans = 0

for i in range(3):
  if A[i] == B[i]:
    ans += 1
    
print(ans)

Buggy submission (verdict: Runtime Error):
A = sys.stdin.readline()
B = sys.stdin.readline()
ans = 0

for i in range(3):
  if A[i] == B[i]:
    ans += 1
    
print(ans)
Problem p03160 (python)

Fixed submission:
import sys

n = int(sys.stdin.readline())

dp = [0 for i in range(n+1)]
cost = list(map(int, sys.stdin.readline().split())) # 0~3
cost.insert(0, 0)

dp[2] = abs(cost[1] - cost[2])


for i in range(3, n+1):
  dp[i] = min(dp[i-1] + abs(cost[i-1] - cost[i]), dp[i-2] + abs(cost[i-2] - cost[i]))
  
print(dp[n])

Buggy submission (verdict: Runtime Error):
import sys

n = int(sys.stdin.readline())

dp = [0 for i in range(n+1)]
cost = list(map(int, sys.stdin.readline().split()))

dp[1] = cost[0]
dp[2] = abs(dp[1] - cost[2])


for i in range(3, n+1):
  dp[i] = min(dp[i-1] + abs(cost[i+1] - cost[i]), dp[i-2] + abs(cost[i-1] - cost[i+1]))
  
print(dp[n])

Buggy submission (verdict: Runtime Error):
import sys

n = int(sys.stdin.readline())

dp = [0 for i in range(n+1)]
cost = list(map(int, sys.stdin.readline()))

dp[1] = cost[0]
dp[2] = abs(dp[1] - cost[2])


for i in range(3, n+1):
  dp[i] = min(dp[i-1] + abs(cost[i+1] - cost[i]), dp[i-2] + abs(cost[i-1] - cost[i+1]))
  
print(dp[n])

Buggy submission (verdict: Runtime Error):
import sys

n = int(sys.stdin.readline())

dp = [0 for i in range(n+1)]
cost = list(map(int, sys.stdin.readline()))

dp[1] = cost[0]
dp[2] = abs(dp[1] - cost[2])


for i in range(3, n+1):
  dp[i] = min(dp[i-1] + abs(cost[i+1] - cost[i]), dp[i-2] + abs(cost[i-1] - cost[i+1])
Problem p02687 (python)

Fixed submission:
S=input()
if S=="ABC":
    print("ARC")
else:
    print("ABC")

Buggy submission (verdict: Runtime Error):
S=input()
if S=ABC:
    print("ARC")
else:
    print("ABC")

Buggy submission (verdict: Runtime Error):
S=input()
if int(S)=ABC:
    print("ARC")
else:
    print("ABC")

Buggy submission (verdict: Runtime Error):
S=input()
if S==ABC
    print("ARC")
else:
    print("ABC")

Buggy submission (verdict: Runtime Error):
if ABC:
    print("ARC")
else:
    print("ABC")
Problem p02705 (python)

Fixed submission:
r=input()
R=2*3.1415*float(r)
print(R)

Buggy submission (verdict: Runtime Error):
R=str(input())
length==2*3.14*int(R)
Problem p02705 (python)

Fixed submission:
import math

r=input()
r=int(r)
l=2*math.pi*r
print(l)

Buggy submission (verdict: Runtime Error):
import math

r=input()
l=2*math.pi*r
print(l)

Buggy submission (verdict: Runtime Error):
import math
a=input()
l=2*pi()*a
print(l)
Problem p02706 (python)

Fixed submission:
N,M=input().split()
N=int(N)
M=int(M)

sum=0
a=list(map(int,input().split()))
for num in range(M):
	sum=sum+a[num]
	
nokori=N-sum	
if nokori>=0:
	print(nokori)
	
else:
	print(-1)

Buggy submission (verdict: Runtime Error):
N=input()
N=int(N)
M=input()
M=int(M)

sum=0
for num in range(M):
	a=input()
	a=int(a)
	sum=sum+a
	
nokori=N-sum	
if nokori>=0:
	print(nokori)
	
else:
	print(-1)
Problem p02784 (python)

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

s=0

for i in range(N):
    s+=A[i]
if(s>=H):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
H, N = map(int, input().split())
A = list(map(int, input().split()))

s=0

for i in range(N):
    s+=A[i]
if(s>=H):
    print(Yes)
else:
    print(No)
Problem p02784 (python)

Fixed submission:
input_list = list(map(int, input().split()))
hp = input_list[0]
arts = input_list[1]
arts_list = list(map(int, input().split()))
if hp <= sum(arts_list):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
input_list = list(map(int, input().split()))
hp = input_list[0]
arts = input_list[1]
arts_list = list(map(int, input().split()))
if hp < sum(arts_list):
  print(Yes)
else:
  print(No)
Problem p02817 (python)

Fixed submission:
strings = list(map(str, input().split()))
string = strings[1] + strings[0]
print(string)

Buggy submission (verdict: Runtime Error):
input_list = list(map(int, input().split()))
games = input_list[0]
temp = input_list[1]
input_list = list(map(int, input().split()))
r = input_list[0]
s = input_list[1]
p = input_list[2]
target = input()

def no_win_hand(next_hand):
  myhand = win_janken(next_hand)
  return myhand

def get_point(myhand):
  if myhand == 'r':
    point = r
  elif myhand == 's':
    point = s
  else:
    point = p
  return point

def win_janken(hand, next_hand = 'non', donate = 'non'):
  if hand == 'r':
    myhand = 'p'
  elif hand == 's':
    myhand = 'r'
  else:
    myhand = 's'
  point = get_point(myhand)
  if myhand == donate:
    nothand = no_win_hand(next_hand)[0]
    select_hands = ['r','s','p']
    for hand_1 in select_hands:
      if hand_1 is not donate and  hand_1 is not nothand:
        myhand = hand_1
    point = 0
  return myhand, point

allpoint = 0
for m in range(temp):
  group = ''
  for ind, n in enumerate(target):
    if ind % temp == m:
       group += n
  points = 0
  myhands =''
  for index, string in enumerate(group):
    if len(myhands) > 0:
      donate = myhands[index - 1]
    else:
      donate = 'non'
    if index < len(group) - 1:
      myhand, point = win_janken(string, group[index + 1], donate)
    else:
      myhand, point = win_janken(string, 'non', donate)
    points += point
    myhands += myhand
  allpoint += points
print(allpoint)
Problem p02741 (python)

Fixed submission:
data=(1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51)
print(str(data[int(input())-1]))

Buggy submission (verdict: Runtime Error):
def scanf(scanstr,data_format):
    scanstr=scanstr.split(" ")
    if(type(data_format) is not list):
        print("data_format error")
    if(len(scanstr)!=len(data_format)):
        print("Error")
        return -1
    j=0
    for kata in data_format:
        if(kata=="str"):
            scanstr[j]=str(scanstr[j])
        if(kata=="int"):
            scanstr[j]=int(scanstr[j])
        j=j+1
    return scanstr
data=mylib.scanf(input(),["int","int"])
if data[0]!=1 and data[1]!=1:
    print(str(round(float(data[0]*data[1])/2.0+0.1)))
else:
    print(1)
Problem p02742 (python)

Fixed submission:
def scanf(scanstr,data_format):
    scanstr=scanstr.split(" ")
    if(type(data_format) is not list):
        print("data_format error")
    if(len(scanstr)!=len(data_format)):
        print("Error")
        return -1
    j=0
    for kata in data_format:
        if(kata=="str"):
            scanstr[j]=str(scanstr[j])
        if(kata=="int"):
            scanstr[j]=int(scanstr[j])
        j=j+1
    return scanstr
data=scanf(input(),["int","int"])
if data[0]==1 or data[1]==1:
    print(1)
elif (data[0]*data[0])%2==0:
    print(str(round((data[0]*data[1])/2)))
else:
    print(str(round((data[0]*data[1]+1)/2)))

Buggy submission (verdict: Runtime Error):
def scanf(scanstr,data_format):
    scanstr=scanstr.split(" ")
    if(type(data_format) is not list):
        print("data_format error")
    if(len(scanstr)!=len(data_format)):
        print("Error")
        return -1
    j=0
    for kata in data_format:
        if(kata=="str"):
            scanstr[j]=str(scanstr[j])
        if(kata="int"):
            scanstr[j]=int(scanstr[j])
        j=j+1
    return scanstr
data=mylib.scanf(input(),["int","int"])
if data[0]!=1 and data[1]!=1:
    print(str(round(float(data[0]*data[1])/2.0+0.1)))
else:
    print(1)

Buggy submission (verdict: Runtime Error):
def scanf(scanstr,data_format):
    scanstr=scanstr.split(" ")
    if(type(data_format) is not list):
        print("data_format error")
    if(len(scanstr)!=len(data_format)):
        print("Error")
        return -1
    j=0
    for kata in data_format:
        if(kata=="str"):
            scanstr[j]=str(scanstr[j])
        if(kata=="int"):
            scanstr[j]=int(scanstr[j])
        j=j+1
    return scanstr
import mylib
data=mylib.scanf(input(),["int","int"])
if data[0]!=1 and data[1]!=1:
    print(str(round(float(data[0]*data[1])/2.0+0.1)))
else:
    print(1)
Problem p02743 (python)

Fixed submission:
import math
def scanf(scanstr,data_format):
    scanstr=scanstr.split(" ")
    if(type(data_format) is not list):
        print("data_format error")
    if(len(scanstr)!=len(data_format)):
        print("Error")
        return -1
    j=0
    for kata in data_format:
        if(kata=="str"):
            scanstr[j]=str(scanstr[j])
        if(kata=="int"):
            scanstr[j]=int(scanstr[j])
        j=j+1
    return scanstr
d=scanf(input(),["int","int","int"])
if (d[2]-d[0]-d[1]>0)and(4*d[0]*d[1]<(d[2]-d[0]-d[1])*(d[2]-d[0]-d[1])):
    print("Yes")
else :
    print("No")

Buggy submission (verdict: Runtime Error):
import math
def scanf(scanstr,data_format):
    scanstr=scanstr.split(" ")
    if(type(data_format) is not list):
        print("data_format error")
    if(len(scanstr)!=len(data_format)):
        print("Error")
        return -1
    j=0
    for kata in data_format:
        if(kata=="str"):
            scanstr[j]=str(scanstr[j])
        if(kata=="int"):
            scanstr[j]=int(scanstr[j])
        j=j+1
    return scanstr
data=scanf(input(),["int","int","int"])
if (data[0]+data[1]+2*math.sqrt(data[0]*data[1]))<data[2]):
    print("Yes")
else :
    print("No")