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

Fixed submission:
# -*- coding: utf-8 -*-

N,M = list(map(int, input().rstrip().split()))
pS_list = []

for i in range(M):
    inp = input().rstrip().split()
    pS_list.append( [int(inp[0]), inp[1]] )

#-----
problem_AC_set = set()
problem_WA_dic = {}

for p,S in pS_list:
    if (S == "AC") and (p not in problem_AC_set):
        problem_AC_set.add(p)
    
    if (S == "WA") and (p not in problem_AC_set):
        problem_WA_dic.setdefault(p, 0)
        problem_WA_dic[p] += 1

cnt_AC = len(problem_AC_set)
cnt_WA = sum([v for k,v in problem_WA_dic.items() if k in problem_AC_set])

print(cnt_AC, cnt_WA)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys

N,M = map( int, input().split() )

#str_lines = [x.strip("\n") for x in sys.stdin.readlines()]

list_str_P_S = [input().split() for i in range(M)]

#-----
#-----

list_question_no=list(set(list(zip(*list_str_P_S))[0]))

#print("list_str_P_S=",list_str_P_S)
#print("list_question_no=",list_question_no)

count_AC=0
count_WA=0
list_temp=[]
list_next=[]
for str_i in list_question_no:

  for L in list_str_P_S:
    str_number = L[0]
    result = L[1]
    
    if str_number == str_i:
      list_temp.append(L)
    else:
      list_next.append(L)
  #print("list_temp",list_temp)
  #print("list_next",list_next)
  

  for L in list_temp:
    str_number = L[0]
    result = L[1]
    
    if str_number == str_i:
      if result == "WA":
        count_WA += 1
        #print("L",L,count_AC,count_WA)
      elif result == "AC":
        count_AC += 1
        #print("L",L,count_AC,count_WA)
        break
        
  list_str_P_S=list_next
  list_temp=[]
  list_next=[]
  #print("list_str_P_S next=",list_str_P_S)  
  #print("-----")

#print("ans=",count_AC,count_WA)
print(count_AC,count_WA)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys

N,M = map( int, input().split() )

#str_lines = [x.strip("\n") for x in sys.stdin.readlines()]
str_lines = [input() for i in range(M)]

list_str_P_S=[]
for S in str_lines:
  list_str_P_S.append( list(S.split()) )

#-----
#-----

list_question_no=list(set(list(zip(*list_str_P_S))[0]))

#print("list_str_P_S=",list_str_P_S)
#print("list_question_no=",list_question_no)

count_AC=0
count_WA=0
for str_i in list_question_no:

  for L in list_str_P_S:
    str_number = L[0]
    result = L[1]
    
    if str_number == str_i:
      if result == "WA":
        count_WA += 1
        #print("L",L,count_AC,count_WA)
      elif result == "AC":
        count_AC += 1
        #print("L",L,count_AC,count_WA)
        break

#print("ans=",count_AC,count_WA)
print(count_AC,count_WA)
Problem p03000 (python)

Fixed submission:
# -*- coding: utf-8 -*-

N,X = list(map(int, input().rstrip().split()))
L_list = list(map(int, input().rstrip().split()))
#-----

D=0
ans = len(L_list) + 1

cnt=1
for i in range(N):
    D = D + L_list[i]
    
    if D <= X:
        cnt += 1

print(cnt)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

N,X = list(map(int, input().rstrip().split()))
L_list = list(map(int, input().rstrip().split()))
#-----

i=2
D=0
while D <= X:
    D = D + L_list[i-2]
    ans = i-1
    i += 1

print(ans)
Problem p03029 (python)

Fixed submission:
# -*- coding: utf-8 -*-

A,P = list(map(int, input().rstrip().split()))
print( (A*3 + P)//2 )

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

N = int(input().strip())

sp_list=[]
for i in range(N):
    s,p = input().rstrip().split()
    sp_list.append( [i+1,s,int(p)] )
#-----

sp_list.sort( key=lambda x:(x[1],-x[2]) )

for i,s,p in sp_list:
    print(i)
Problem p03231 (python)

Fixed submission:
# -*- coding: utf-8 -*-
import sys

N,M = list(map(int, input().rstrip().split()))
S = input().strip()
T = input().strip()
#-----

def gcd(a,b):
    if b == 0: 
        return a
    return gcd(b, a % b)

def lcm(a, b):
    return (a * b) // gcd(a, b)

lcm = lcm(N,M)
L = lcm
X1_dic={}

X1_dic[0] = S[0]
for i in range(1,N):
    X1_dic[ int(i*(L/N)+1) - 1 ] = S[i]


if X1_dic[0] != T[0]:
    print(-1)
    sys.exit()

for i in range(1,M):
    key = int(i*(L/M)+1) - 1
    if (key in X1_dic) and  X1_dic[key] != T[i]:
        print(-1)
        sys.exit()
    
print(L)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

N,M = list(map(int, input().rstrip().split()))
S = input().strip()
T = input().strip()
#-----

def gcd(a,b):
    if b == 0: 
        return a
    return gcd(b, a % b)

def lcm(a, b):
    return (a * b) // gcd(a, b)

lcm = lcm(N,M)
L = lcm

X1_list = [" "]*L
X2_list = [" "]*L

X1_list[0] = S[0]
for i in range(1,N):
    X1_list[ int(i*(L/N)+1) - 1 ] = S[i]

X2_list[0] = T[0]   
for i in range(1,M):
    X2_list[ int(i*(L/M)+1) - 1 ] = T[i]

for i in range(L):
    if X1_list[i] != " " and X2_list[i] != " " and X1_list[i] != X2_list[i]:
        print(-1)
        break
else:
    print(L)
Problem p03385 (python)

Fixed submission:
s = input().strip()

s_set=set(s)
print("Yes" if len(s_set)==3 else "No")

Buggy submission (verdict: Runtime Error):
#A,B,K = [int(i) for i in input().rstrip().split()]
A,B,K = list(map(int, input().rstrip().split()))

#nums=[i for i in range(A,B+1)]
nums=list(range(A,B+1))

if K <= len(nums)//2:
  print(*(nums[:K] + nums[-K:]),sep="\n")
else:
  print(*nums,sep="\n")
Problem p03386 (python)

Fixed submission:
A,B,K = [int(i) for i in input().rstrip().split()]

if K <= (B-A+1)/2:
  print(*( list(range(A,A+K)) + list(range(B-K+1,B+1)) ),sep="\n")
else:
  print(*list(range(A,B+1)),sep="\n")

Buggy submission (verdict: Runtime Error):
#A,B,K = [int(i) for i in input().rstrip().split()]
A,B,K = list(map(int, input().rstrip().split()))

#nums=[i for i in range(A,B+1)]
nums=list(range(A,B+1))

if K <= len(nums)//2:
  print(*(nums[:K] + nums[-K:]),sep="\n")
else:
  print(*nums,sep="\n")

Buggy submission (verdict: Runtime Error):
#A,B,K = [int(i) for i in input().rstrip().split()]
A,B,K = list(map(int, input().rstrip().split()))

#nums=[i for i in range(A,B+1)]
nums=list(range(A,B+1))

if K <= len(nums)/2:
  print(*(nums[:K] + nums[-K:]),sep="\n")
else:
  print(*nums,sep="\n")

Buggy submission (verdict: Runtime Error):
A,B,K = [int(i) for i in input().rstrip().split()]

nums=list(range(A,B+1))

if K <= len(nums)/2:
  print(*(nums[:K] + nums[-K:]),sep="\n")
else:
  print(*nums,sep="\n")
Problem p03436 (python)

Fixed submission:
# -*- coding: utf-8 -*-
from collections import Counter
from collections import deque

H,W = list(map(int, input().rstrip().split()))
S_list = [list(input().rstrip()) for i in range(H)]
#-----

def checkRoute(matrix):
    # queue = [ ( (row, column),step ) ]
    # deque = [ ( (int, int   ),int ) ]
    queue = deque([  ( (1,1),1 )  ])

    delta = [(1,0),(-1,0),(0,1),(0,-1)]
    visited = set()
    
    while queue:
        (r,c),step = queue.popleft()
        
        for d in delta:
            next_r = r + d[0]
            next_c = c + d[1]
            
            if (next_r == H) and (next_c == W):
                return step+1
            
            if (1 <= next_r <= H) and (1 <= next_c <= W) and \
               (next_r, next_c) not in visited  and \
               matrix[next_r][next_c] == ".":
            
                queue.append( ( (next_r, next_c), step+1 ) )
                visited.add( (next_r, next_c) )

    return -1

#-----
# add dummy node(Black area) around the original data
for i in range(len(S_list)):
    S_list[i] = ["#"] + S_list[i][:] + ["#"]
    
S_list = [["#"]*(W+2)] + S_list[:] + [["#"]*(W+2)]
#-----

cnt_dic = Counter( sum(S_list,[]) )
min_step = checkRoute(S_list)

if min_step != -1:
    print( cnt_dic["."] - min_step )
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
from collections import Counter
from collections import deque

H,W = list(map(int, input().rstrip().split()))
S_list = [list(input().rstrip()) for i in range(H)]
#-----

def checkRoute(matrix):
    # queue = [ ( (row, column),step ) ]
    # deque = [ ( (int, int   ),int ) ]
    queue = deque([  ( (1,1),1 )  ])

    delta = [(1,0),(-1,0),(0,1),(0,-1)]
    visited = set()
    
    while queue:
        (r,c),step = queue.popleft()
        
        for d in delta:
            next_r = r + d[0]
            next_c = c + d[1]
            
            if (next_r == H) and (next_c == W):
                return step+1
            
            if (1 <= next_r <= H) and (1 <= next_c <= W) and \
               (next_r, next_c) not in visited  and \
               matrix[next_r][next_c] == ".":
            
                queue.append( ( (next_r, next_c), step+1 ) )
                visited.add( (next_r, next_c) )


#-----
# add dummy node(Black area) around the original data
for i in range(len(S_list)):
    S_list[i] = ["#"] + S_list[i][:] + ["#"]
    
S_list = [["#"]*(W+2)] + S_list[:] + [["#"]*(W+2)]
#-----

cnt_dic = Counter( sum(S_list,[]) )
min_step = checkRoute(S_list)
print( cnt_dic["."] - min_step )
Problem p03681 (python)

Fixed submission:
# -*- coding: utf-8 -*-
import sys

N,M = list(map(int, input().rstrip().split()))
#-----

divisor = 10**9 + 7

cnt=1
diff = abs(N-M)
if diff >=2:
    print("0")
    sys.exit()
else:
    for num in [N,M]:
        for i in range(1,num+1):
            cnt = (cnt * i) % divisor

    if diff == 0:
        cnt = (cnt * 2) % divisor

print(cnt)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

N,M = list(map(int, input().rstrip().split()))
#-----

divisor = 10**9 + 7

cnt=1
diff = abs(N-M)
if diff >=2:
    print("0")
    sys.exit()
else:
    for num in [N,M]:
        for i in range(1,num+1):
            cnt = (cnt * i) % divisor

    if diff == 0:
        cnt = (cnt * 2) % divisor

print(cnt)
Problem p02921 (python)

Fixed submission:
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/

import math
import statistics

cnt = 0
s = input()
t = input()
for i in range(3):
  if s[i] == t[i]:
    cnt += 1;
print(cnt)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/
#
# lang: Python3 (3.4.3)

import math
import statistics
import numpy as np

n = int(input())
h = list(int(i) for i in input().split())

i = 0
ans = 0
cnt = 0
while i + 1 < n:
  if h[i] >= h[i + 1]:
    cnt += 1
  else:
    if ans < cnt:
      ans = cnt
    cnt = 0
  i += 1

if ans < cnt:
  ans = cnt
print(ans)
Problem p03086 (python)

Fixed submission:
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/

import math
import statistics

s = input()
length = 0
ans = 0
for ch in s:
    if ch in ('A','C','G','T'):
        length += 1
        ans = max(ans, length)
    else:
        length = 0
print(ans)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/

import math
import statistics

s = input()
ans = 0
for i in range(n):
  for j in range(i, n):
    if all('ACGT'.count(c) == 1 for c in s[i : j + 1]):
      ans = max(ans, j - i + 1)
print(ans)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/

import math
import statistics

s = input()
ans = 0
for i in range(n):
  for j in range(i, n):
    if all('ACGT'.count(c) == 1 for c in S[i : j + 1]):
      ans = max(ans, j - i + 1)
print(ans)
Problem p03206 (python)

Fixed submission:
d = int(input())
if d == 25:
	print("Christmas")
elif d == 24:
	print("Christmas Eve")
elif d == 23:
	print("Christmas Eve Eve")
else:
	print("Christmas Eve Eve Eve")

Buggy submission (verdict: Runtime Error):
d = int(input())
if d == 25:
	print('Christmas')
elif d == 24:
	print('Christmas Eve')
elif d == 23:
	print('Christmas Eve Eve')
else d == 22:
	print('Christmas Eve Eve Eve')
Problem p03228 (python)

Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

def cookie(p1,p2):
	if p1 % 2 == 1:
		p1 -= 1
	p1 /= 2
	p2 += p1
	return p1,p2

a,b,k = map(int, input().split())
for i in range(k):
	if i % 2 == 0:
		a,b = cookie(a,b)
	else:
		b,a = cookie(b,a)
print("{} {}".format(int(a),int(b)))

Buggy submission (verdict: Runtime Error):
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>

void cookie(int *p1,int *p2){
	if(*p1 % 2)	--(*p1);
	*p1 /= 2;
	*p2 += *p1;
	return;
}

int main(int argc, char const *argv[])
{	
	int a,b,k;
	scanf("%d%d%d",&a,&b,&k);
	for (int i = 1; i <= k; ++i)
	{
		if(i % 2)	cookie(&a,&b);
		else cookie(&b,&a);
	}
	printf("%d %d\n",a,b);
}
Problem p03260 (python)

Fixed submission:
a,b = map(int, input().split())
if a % 2 == 1 and b % 2 == 1:
	print('Yes')
else:
	print('No')

Buggy submission (verdict: Runtime Error):
a,b,c = map(int, input().split())
if a % 2 == 1 and b % 2 == 1:
	print('Yes')
else:
	print('No')

Buggy submission (verdict: Runtime Error):
a,b,c = map(int, input().split())
if a % 2 == 1 and b % 2 == 1:
	print("Yes")
else:
	print("No")

Buggy submission (verdict: Runtime Error):
a,b,c = map(int, input().split())
if a % 2 == 1 && b % 2 == 1:
	print("Yes")
else:
	print("No")

Buggy submission (verdict: Runtime Error):
a,b,c = map(int, input().split())
d = "Yes" if (a % 2 == 1 and b % 2 == 1) else "No"
print(d)
Problem p03433 (python)

Fixed submission:
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/

import math
import statistics

n = int(input())
a = int(input())
if n % 500 <= a:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/

import math
import statistics

# fact(int)
def fact(n):
  if(n == 1):
    return 1
  else:
    return (n * fact(n - 1))

# gcd(int,int)
def gcd(a,b):
  if a == 0:
    return b
  elif b == 0:
    return a
  else:
    return gcd(b,a % b)

# lcm(int,int)
def lcm(a,b):
  return (a * b / gcd(a,b))

# qsort(array[])
def qsort(seq):
  if len(seq) < 1:
      return seq
  pivot = seq[0]
  left = []
  right = []
  for x in range(1, len(seq)):
    if seq[x] <= pivot:
        left.append(seq[x])
    else:
        right.append(seq[x])
  left = qsort(left)
  right = qsort(right)
  foo = [pivot]
  return (left + foo + right)

#  = map(int, input().split())
#  = int(input())
#  = raw_input().split()
#  = list(int(i) for i in input().split())  

n = int(input())
a = int(input())
if n % 500 <= a:
  print('Yes')
else:
  print('No')
Problem p03447 (python)

Fixed submission:
# , = map(int, input.split())
#  = int(input())

x = int(input())
a = int(input())
b = int(input())
print((x - a) % b)

Buggy submission (verdict: Runtime Error):
# , = map(int, input.split())
#  = int(input())
x,a,b = map(int, input().split())
print((x - a) % b)
Problem p03547 (python)

Fixed submission:
a,b = map(str, input().split())
if a == b:
	print('=')
elif a < b:
	print('<')
else:
	print('>')

Buggy submission (verdict: Runtime Error):
a,b = map(str, input().split())
if a < b:
	prinf('<')
elif a > b:
	print('>')
else:
	print('=')

Buggy submission (verdict: Runtime Error):
a,b = map(str,input())
if a < b:
	prinf('<')
elif a > b:
	print('>')
else:
	print('=')
Problem p03592 (python)

Fixed submission:
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/
#
# lang: Python3 (3.4.3)

import math
import statistics
import numpy as np
import queue

n,m,k = map(int, input().split())
for i in range(n + 1):
  for j in range(m + 1):
    if n * j + m * i - 2 * i * j == k:
      print('Yes')
      exit(0)
print('No')

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/
#
# lang: Python3 (3.4.3)

import math
import statistics
import numpy as np
import queue

n,m,k = map(int, input().split())
for i in range(n):
  for j in range(m):
    if i * (m - j) + j * (n - i) == k:
      print('Yes')
      exit(-1)
print('No')

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/
#
# lang: Python3 (3.4.3)

import math
import statistics
import numpy as np
import queue

n,m,k = map(int, input.split())
for i in range(n):
  for j in range(m):
    if i * (m - j) + j * (n - i) == k:
      print('Yes')
    else:
      print('No')
Problem p03635 (python)

Fixed submission:
n,m = map(int, input().split())
print(int((n - 1) * (m - 1)))

Buggy submission (verdict: Runtime Error):
n,m = map(int, input.split())
print((n - 1)*(m - 1))
Problem p03693 (python)

Fixed submission:
r,g,b = map(int, input().split(' '))
temp = 100 * r + 10 * g + b
if temp % 4 == 0:
	print("YES")
else:
	print("NO")

Buggy submission (verdict: Runtime Error):
#include <bits/stdc++.h>
using namespace std;

int main(int argc, char const *argv[]){
	int r,g,b;
	cin >> r >> g >> b;
	if((100 * r + 10 * g + b) % 4 == 0)	cout << "YES\n" << endl;
	else puts("NO\n");
}
Problem p03694 (python)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
print(max(a) - min(a))

Buggy submission (verdict: Runtime Error):
n = map(int(input()))
a = list(map(int, input().split()))
print(max(a) - min(a))

Buggy submission (verdict: Runtime Error):
n = map(int, input.split())
a = list(map(int, input().split()))
print(max(a) - min(a))
Problem p03795 (python)

Fixed submission:
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/

import math
import statistics

n = int(input())
p = 600 * (n // 15) + 800 * (n - n // 15)
print(p)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/

import math
import statistics

n = int(input())
p = 600 * (n // 15) + 800 * (n - n // 15)
print(c)
Problem p02600 (python)

Fixed submission:
x = int(input())
if x <= 599:
    print("8")
elif x <= 799:
    print("7")
elif x <= 999:
    print("6")
elif x <= 1199:
    print("5")
elif x <= 1399:
    print("4")
elif x <= 1599:
    print("3")
elif x <= 1799:
    print("2")
else:
    print("1")

Buggy submission (verdict: Runtime Error):
x = input()
if x =< 599:
    print("8")
elif x=< 799:
    print("7")
elif x=< 999:
    print("6")
elif x=< 1199:
    print("5")
elif x=< 1399:
    print("4")
elif x=< 1599:
    print("3")
elif x=< 1799:
    print("2")
else:
    print("1")
Problem p02621 (python)

Fixed submission:
a = int(input())
b = a + a ** 2 + a ** 3
print(b)

Buggy submission (verdict: Runtime Error):
a = int(input())
return a + a ** 2 + a ** 3

Buggy submission (verdict: Runtime Error):
a = input()
return a + a ** 2+ a ** 3

Buggy submission (verdict: Runtime Error):
return a + a ** a + a ** a ** a

Buggy submission (verdict: Runtime Error):
a = input()
return a + a ** a + a ** a ** a
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):
while True:
    a,b=map(int,input().split())
    if (a*b)%2 == 0:
        print('Even')

    else:
        print('Odd')
Problem p03386 (python)

Fixed submission:
# a = input()
# b = input()
# k = input()
str = input()
str = str.split()
#print(str)
a = int(str[0])
b = int(str[1])
k = int(str[2])
#print("ans")
if b - a >= k*2:
    for i in range(a,a+k):
        print(i)
    #print("ss")
    for i in range(b-k+1,b+1):
        print(i)
else:
    for i in range(a,b+1):
        print(i)

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

a = int(a)
b = int(b)
k = int(k)
print("ans")
if b - a >= k*2:
    for i in range(a,a+k):
        print(i)
    print("ss")
    for i in range(b-k+1,b+1):
        print(i)
else:
    for i in range(a,b+1):
        print(i)
Problem p02783 (python)

Fixed submission:
H, A= map(int, input().split())
count=0
while H>0:
    H=H-A
    count=count+1


print(count)

Buggy submission (verdict: Runtime Error):
H, N = map(int, input().split())
A = [int(x) for x in input().split()]
list2 = sorted(A, reverse=True)  # reverseをTrueに
if N>0:
    del list2[0:N]
    print(sum(list2))
elif N<0:
    print(sum(A))

Buggy submission (verdict: Runtime Error):
H, N = map(int, input().split())
A = [int(x) for x in input().split()]
list2 = sorted(A, reverse=True)  # reverseをTrueに
if N>0:
    del list2[0:N]
    print(sum(list2))
elif N<0:
    print(sum(A))
Problem p02801 (python)

Fixed submission:
alpha2num=lambda c:ord(c)-ord('a')+1

result=(alpha2num(input()))

if result==1:
    print('b')
elif result==2:
    print('c')
elif result==3:
    print('d')
elif result==4:
    print('e')
elif result==5:
    print('f')
elif result==6:
    print('g')
elif result==7:
    print('h')
elif result==8:
    print('i')
elif result==9:
    print('j')
elif result==10:
    print('k')
elif result==11:
    print('l')
elif result==12:
    print('m')
elif result==13:
    print('n')
elif result==14:
    print('o')
elif result==15:
    print('p')
elif result==16:
    print('q')
elif result==17:
    print('r')
elif result==18:
    print('s')
elif result==19:
    print('t')
elif result==20:
    print('u')
elif result==21:
    print('v')
elif result==22:
    print('w')
elif result==23:
    print('x')
elif result==24:
    print('y')
elif result==25:
    print('z')

Buggy submission (verdict: Runtime Error):
n, m = list(map(int, input().split()))

ac = [0] * (n+1)
wa = [0] * (n+1)
pena = 0

for i in range(m):
    question, answer = input().split()
    question = int(question)
    if (answer == "AC") and (ac[question] == 0):
        ac[question] = 1
        pena += wa[question]
    elif (answer == "WA") and (ac[question] == 0):
        wa[question] += 1

print(sum(ac), pena)
Problem p02802 (python)

Fixed submission:
n, m = list(map(int, input().split()))

ac = [0] * (n+1)
wa = [0] * (n+1)
pena = 0

for i in range(m):
    question, answer = input().split()
    question = int(question)
    if (answer == "AC") and (ac[question] == 0):
        ac[question] = 1
        pena += wa[question]
    elif (answer == "WA") and (ac[question] == 0):
        wa[question] += 1

print(sum(ac), pena)

Buggy submission (verdict: Runtime Error):
n, m = list(map(int, input().split()))

ac = [0] * n
wa = [0] * n
pena = 0

for i in range(m):
    question, answer = input().split()
    question = int(question)
    if (answer == "AC") and (ac[question] == 0):
        ac[question] = 1
        pena += wa[question]
    elif (answer == "WA") and (ac[question] == 0):
        wa[question] += 1

print(sum(ac), pena)

Buggy submission (verdict: Runtime Error):
n, m = list(map(int, input().split()))

ac = [0] * n
wa = [0] * n
pena = 0

for i in range(m):
    question, answer = input().split()
    question = int(question)
    if (answer == "AC") and (ac[question] == 0):
        ac[question] = 1
        pena += wa[question]
    elif (answer == "WA") and (ac[question] == 0):
        wa[question] += 1

print(sum(ac), pena)

Buggy submission (verdict: Runtime Error):
n,m = list(map(int, input().split()))
 
ac = [0]*n
wa = [0]*n
pena = 0
 
for i in range(m):
  question, answer = input().split()
  question = int(question)
  
  if (answer=="AC") and (ac[question]==0):
    ac[ques] = 1
    pena += wa[ques]
  elif (answer=="WA") and (ac[question]==0):
    wa[question] += 1
    
print(sum(ac), pena)

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
ac_list = [0] * N
wa_list = [0] * N
#Piは問題番号、answerは正解したかどうか
for i in range(M):
    Pi, answer = input().split()
    number=int(Pi)
    if answer =='AC':
        #正解は一回だけカウントされるので1を入れるだけで良い
        ac_list[number] =1
        #ACの箱に1が入っていなければWAの箱に1を足す、不正解は何回もカウントされる
    else:
        if ac_list[number]!=1:
            wa_list[number] =wa_list[number]+1

wa_num = 0
ac_num = 0
for i in range(N):
    if ac_list[i] == 1:
       ac_num=ac_num+1
       wa_num=wa_list[i]
    
print(ac_num, wa_num)
Problem p02817 (python)

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

Buggy submission (verdict: Runtime Error):
n=int(input())
for p in range(2, 1000000):
    if n % p != 0:
        print(n)
        break
    else:
       n=n+1