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

Fixed submission:
n = int(input())
 
numbers = list(map(int, input().split(' ')))
approved = True
 
for num in numbers:
  if (num % 2 == 0):
    if (num % 3 == 0) or (num % 5 == 0):
      approved = True
      continue
    else:
      approved = False
      print('DENIED')
      break
if approved:
  print('APPROVED')

Buggy submission (verdict: Runtime Error):
n = int(input())
 
numbers = list(map(int, input().split(' ')))
approved = False
 
for num in numbers:
  if (num % 2 == 0):
  	if (num % 3 == 0) or (num % 5 == 0):
      approved = True
      continue
  	else:
      approved = False
      print('DENIED')
      break
if approved:
  print('APPROVED')

Buggy submission (verdict: Runtime Error):
n = int(input())
 
numbers = list(map(int, input().split(' ')))
approved = False
 
for num in numbers:
  if (num % 2 == 0):
  	if (num % 3 == 0) or (num % 5 == 0):
    	approved = True
    	continue
  	else:
    	approved = False
    	print('DENIED')
    	break
if approved:
  print('APPROVED')

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

numbers = map(int, input().split(' '))
approved = False

for num in numbers[1::2]:
  if (num % 3 == 0) or (num % 5 == 0):
    approved = True
    continue
  else:
    approved = False
    print('DENIED')
    break
if approved:
  print('APPROVED')
Problem p02848 (python)

Fixed submission:
input_number = int(input())
input_str = input()
abc_list = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
abc_list = abc_list + abc_list
output_str = ""
for i in range(len(input_str)):
    output_str += abc_list[abc_list.index(input_str[i]) + input_number]
print(output_str)

Buggy submission (verdict: Runtime Error):
input_number = int(input())
input_str = input()
abc_list = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
abc_list = abc_list + abc_list
for i in len(input_str):
    output_str += abc_list[abc_list.index(input_str[i]) + input_number]
print(output_str)

Buggy submission (verdict: Runtime Error):
input_number = int(input())
input_str = input()
abc_list = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
abc_list = abc_list + abc_list
for i in len(input_str):
    output_str += abc_list[abc_list.index(input_str[i]) + input_number]
Problem p03385 (python)

Fixed submission:
S = input()
if len(S) == 3 and "a" in S and "b" in S and "c" in S:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
A, B, C = sorted(map(int, input().split()))

def calculate(P, Q, R):
    num = 0
    if abs(P - Q) % 2 == 0:
        num += abs(P - Q) // 2
    else:
        num += 1 + (abs(P - Q) + 1) // 2
        P += 1
        R += 1

    if  P - R >= 0:
        if abs(P - R) % 2 == 0:
            num += abs(P - R) // 2
        else:
            num += 1 + (abs(P - R) + 1) // 2

    else:
        num += abs(P - R)

    return num

ans = min(calculate(C, B, A), calculate(C, A, B), calculate(B, A, C))

print(ans)

Buggy submission (verdict: Runtime Error):
A, B, C = sorted(map(int, input().split()))

def calculate(P, Q, R):
    num = 0
    if abs(P - Q) % 2 == 0:
        num += abs(P - Q) // 2
    else:
        num += 1 + (abs(P - Q) + 1) // 2
        P += 1
        R += 1

    if abs(P - R) % 2 == 0:
        num += abs(P - R) // 2
    else:
        num += 1 + (abs(P - R) + 1) // 2

    return num

ans = min(calculate(C, B, A), calculate(C, A, B), calculate(B, A, C))

print(ans)
Problem p03473 (python)

Fixed submission:
m = int(input())
print(24-m+24)

Buggy submission (verdict: Runtime Error):
m = int(input())
return 24-m+24

Buggy submission (verdict: Runtime Error):
m = int(input())
return 24-m
Problem p03475 (python)

Fixed submission:
n = int(input())
data = []
for i in range(n-1):
    station_data = [int(x) for x in input().split()]
    data.append(station_data)

time_list = []

for i in range(n):
    total_time = 0

    for j in range(i, n-1):
        if total_time <= data[j][1]:
            total_time = data[j][1] + data[j][0]

        elif total_time % data[j][2] == 0:
            total_time += data[j][0]

        else:
            total_time += data[j][2] - total_time % data[j][2] + data[j][0]

    time_list.append(total_time)

answer = map(str, time_list)
print("\n".join(answer))

Buggy submission (verdict: Runtime Error):
n = int(input())
data = []
for i in range(n-1):
    station_data = [int(x) for x in input().split()]
    data.append(station_data)

time_list = []

for i in range(n-1):
    total_time = data[i][1] + data[i][0]

    for j in range(i+1, n-1):
        if total_time <= data[j][1]:
            total_time = data[j][1] + data[j][0]

        elif total_time % data[j][2] == 0:
            total_time += data[j][0]

        else:
            total_time += total_time % data[j][2] + data[j][0]

    time_list.append(total_time)

time_list.append(0)

answer = map(str, time_list)
print("\n".join(answer)

Buggy submission (verdict: Runtime Error):
n = int(input())
data = []
for i in range(n-1):
    station_data = [int(x) for x in input().split()]
    data.append(station_data)

time_list = []

for i in range(n-1):
    total_time = data[i][1] + data[i][0]

    for j in range(i+1, n-1):
        if total_time <= data[j][1]:
            total_time = data[j][1] + data[j][0]

        elif total_time % data[j][2] == 0:
            total_time += data[j][0]

        else:
            total_time += total_time % data[j][2] + data[j][0]

    time_list.append(total_time)

time_list.append(0)

answer = map(str, time_list)
for i in range(n):
    print(answer[i])
Problem p03495 (python)

Fixed submission:
from collections import defaultdict

parameter = list(map(int, input().split()))
n, k = parameter[0], parameter[1]

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

numbers = defaultdict(lambda: 0)
for b in balls:
    numbers[b] += 1

k = min(k, len(numbers))

sort_number = sorted(numbers.items(), key=lambda x:x[1], reverse=True)
answer = n - sum([sort_number[i][1] for i in range(k)])
print(answer)

Buggy submission (verdict: Runtime Error):
from collections import defaultdict

parameter = list(map(int, input().split()))
n, k = parameter[0], parameter[1]

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

numbers = defaultdict(lambda: 0)
for b in balls:
    numbers[b] += 1

if len(numbers) == k:
    print(0)

else:
    sort_number = sorted(numbers.items(), key=lambda x:x[1], reverse=True)
    answer = n - sum([sort_number[i][1] for i in range(k)])
    print(answer)

Buggy submission (verdict: Runtime Error):
from collections import defaultdict

parameter = list(map(int, input().split()))
n, k = parameter[0], parameter[1]

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

numbers = defaultdict(lambda: 0)
for b in balls:
    numbers[b] += 1

sort_number = sorted(numbers.items(), key=lambda x:x[1], reverse=True)
answer = n - sum([sort_number[i][1] for i in range(k)])
print(answer)
Problem p03501 (python)

Fixed submission:
def plan_one(time, price_base):
    price = time * price_base
    return price

if __name__ == "__main__":
    input_list = input().split(" ")
    N, A, B = int(input_list[0]), int(input_list[1]), int(input_list[2])
    price = min(plan_one(N, A), B)
    print(price)

Buggy submission (verdict: Runtime Error):
def calcurate_digit_sum(num):
    num_str = str(num)
    digit_sum = 0
    for i, digit in enumerate(num_str):
        digit_sum += int(digit)

    return digit_sum

def check_harshad(num):
    digit_sum = calcurate_digit_sum(num)
    if num % digit_sum == 0:
        return("yes")
    return("no")

if __name__ == "__main__":
    N = int(input())
    print(check_harshad(N))

Buggy submission (verdict: Runtime Error):
def calcurate_digit_sum(num):
    num_str = str(num)
    digit_sum = 0
    for i in num_str:
        digit_sum += int(i)

    return digit_sum

def check_harshad(num):
    digit_sum = calcurate_digit_sum(num)
    if num % digit_sum == 0:
        return("yes")
    return("no")

if __name__ == "__main__":
    N = int(input())
    print(check_harshad(N))
Problem p03504 (python)

Fixed submission:
N, C = map(int, input().split())
 
f = [[0] * 100000 for _ in range(C)]
 
for i in range(N):
    s, t, c = map(int, input().split())
    f[c-1][s-1:t] = [1] * (t-s+1)
 
print(max(map(sum, zip(*f))))

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

f = [[0] * 100000 for _ in range(C)]

for i in range(N):
    s, t, c = map(int, input().split())
    f[c-1][s-1] = 1
    f[c-1][t] = -1

for c in range(C):
    for i in range(100000):
        if i > 0:
            f[c][i] += f[c][i-1]

print(max(map(sum, zip(*f))))
Problem p02789 (python)

Fixed submission:
n,m=map(int,input().split())
if n==m:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
n,m=map(int,inpt().split())
if n==m:
  print('Yes')
else:
  print('No')
Problem p02823 (python)

Fixed submission:
n,a,b= map(int,input().split())
if a<b:
  tmp=a
  a=b
  b=tmp
if abs(a-b)%2==0:
  c=abs(a-b)//2

else:

  if abs(a-b)>=3:
    c=min(abs(1-a),abs(n-b))
    c = c-(abs(a-b)//2)
  else:
    c=min(abs(1-a),abs(n-b))


print(c)

Buggy submission (verdict: Runtime Error):
n,a,b= map(int,input().split())
if a<b:
  tmp=a
  a=b
  b=a
if abs(a-b)%2==0:
  c=abs(a-b)//2
else:
  if abs(a-b)>=3:
    c = c-abs(a-b)//2
  elif abs(a-b)<3:
	c=min(abs(1-a),abs(n-b))

print(c)
Problem p03436 (python)

Fixed submission:
from collections import deque
def bfs(field,visited,sy,sx,gy,gx):
    queue = deque([[sy,sx]])
    visited[sy][sx] = 0
    while queue:
        y,x = queue.popleft()
        if [y,x] == [gy,gx]:
            return visited[y][x]
 
        for j,k in ([1,0],[-1,0],[0,1],[0,-1]):
            new_y, new_x = y+j, x+k
            if new_y < 0 or new_y > gy or new_x < 0 or new_x > gx:
              continue
            if field[new_y][new_x] == "." and visited[new_y][new_x] == -1:
                visited[new_y][new_x] = visited[y][x] + 1
                queue.append([new_y, new_x])
                
if __name__ == "__main__":
 
    h,w=map(int,input().split())
    sy=1
    sx=1
    field=[list(input()) for i in range(h)]
    visited = [[-1]*w for i in range(h)]
    sy, sx, gy, gx = sy-1, sx-1, h-1, w-1
    ans=bfs(field,visited,sy,sx,gy,gx)
    #print(ans)
    cnt=0
    for i in range(h):
      for j in range(w):
        if field[i][j]==".":
          cnt+=1
    if ans == None:
      print(-1)
    else:
      print(cnt - ans -1)

Buggy submission (verdict: Runtime Error):
from collections import deque
def bfs(field,visited,sy,sx,gy,gx):
    queue = deque([[sy,sx]])
    visited[sy][sx] = 0
    while queue:
        y,x = queue.popleft()
        if [y,x] == [gy,gx]:
            return visited[y][x]

        for j,k in ([1,0],[-1,0],[0,1],[0,-1]):
            new_y, new_x = y+j, x+k
            if new_y < 0 or new_y > gy or new_x < 0 or new_x > gx:
              continue
            if field[new_y][new_x] == "." and visited[new_y][new_x] == -1:
                visited[new_y][new_x] = visited[y][x] + 1
                queue.append([new_y, new_x])

if __name__ == "__main__":

    h,w=map(int,input().split())
    sy=1
    sx=1
    field=[list(input()) for i in range(h)]
    visited = [[-1]*w for i in range(h)]
    sy, sx, gy, gx = sy-1, sx-1, h-1, w-1
    ans = bfs(field,visited,sy,sx,gy,gx)
    cnt=0
    for i in range(h):
      for j in range(w):
        if field[i][j]==".":
          cnt+=1
    if ans==None:
      print(-1)
    else:
      print(cnt - bfs(field,visited,sy,sx,gy,gx) -1)

Buggy submission (verdict: Runtime Error):
from collections import deque
def bfs(field,visited,sy,sx,gy,gx):
    queue = deque([[sy,sx]])
    visited[sy][sx] = 0
    while queue:
        y,x = queue.popleft()
        if [y,x] == [gy,gx]:
            return visited[y][x]

        for j,k in ([1,0],[-1,0],[0,1],[0,-1]):
            new_y, new_x = y+j, x+k
            if new_y < 0 or new_y > gy or new_x < 0 or new_x > gx:
              continue
            if field[new_y][new_x] == "." and visited[new_y][new_x] == -1:
                visited[new_y][new_x] = visited[y][x] + 1
                queue.append([new_y, new_x])

if __name__ == "__main__":

    h,w=map(int,input().split())
    sy=1
    sx=1
    field=[list(input()) for i in range(h)]
    visited = [[-1]*w for i in range(h)]
    sy, sx, gy, gx = sy-1, sx-1, h-1, w-1
    #print(bfs(field,visited,sy,sx,gy,gx))
    cnt=0
    for i in range(h):
      for j in range(w):
        if field[i][j]==".":
          cnt+=1
          
    print(cnt - bfs(field,visited,sy,sx,gy,gx) -1)
Problem p02898 (python)

Fixed submission:
n, k=map(int,input().split())
h=list(map(int,input().split()))
cnt=0
for i in h:
  if i>=k:
    cnt+=1
print(cnt)

Buggy submission (verdict: Runtime Error):
n, k=map(int,input())
h=list(map(int,input()))
cnt=0
for i in h:
  if i>=k:
    cnt+=1
print(cnt)
Problem p03262 (python)

Fixed submission:
N, X = map(int, input().split())
x = list(map(int, input().split()))
d = []
min=abs(x[0]-X)
for i in range(N):
    d.append(abs(x[i] - X))

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

if len(d) == 1:
    print(d[0])
else:    
    g = gcd(d[0], d[1])
    for i in range(2,N):
        g=gcd(g,d[i])
    print(g)

Buggy submission (verdict: Runtime Error):
N, X = map(int, input().split())
x = list(map(int, input().split()))
d = []
min=abs(x[0]-X)
for i in range(N):
    d.append(abs(x[i] - X))

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

g = gcd(d[0], d[1])
for i in range(2,N):
    g=gcd(g,d[i])
print(g)
Problem p03417 (python)

Fixed submission:
N, M = map(int, input().split())
if N == 1 and M == 1:
    print(1)
elif N == 1 and M != 1:
    print(M - 2)
elif M == 1 and N != 1:
    print(N - 2)
else:
    print((N-2)*(M-2))

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
if N == 1 and M == 1:
    print(1)
elif N == 1 and M != 1:
    print(M - 2)
elif M == 1 and N != !:
    print(M - 2)
else:
    print((N-2)*(M-2))
Problem p03495 (python)

Fixed submission:
from collections import Counter
N, K = map(int, input().split())
A = list(map(int, input().split()))
size=len(Counter(A).most_common())
if K >= size:
    print(0)
else:
    values, counts = zip(*Counter(A).most_common()[::-1])
    ans=0
    for i in range(size-K):
        ans += counts[i]
    print(ans)

Buggy submission (verdict: Runtime Error):
from collections import Counter
N, K = map(int, input().split())
A = list(map(int, input().split()))
size=len(Counter(A).most_common())
if K >= size:
    print(0)
else:
    values, counts = zip(*Counter(A).most_common()[::-1])
    ans=0
    for i in range(size-K):
        ans += counts[i]
print(ans)
Problem p03633 (python)

Fixed submission:
N = int(input())
T=[int(input()) for _ in range(N)]
def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a
def lcm(a, b):
    return a * b // gcd(a, b)
if N>1:
    ans = lcm(T[0], T[1])
    for i in range(2,N):
        ans = lcm(ans, T[i])
else:
    ans=T[0]
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
T=[int(input()) for _ in range(N)]
def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a
def lcm(a, b):
    return a * b // gcd(a, b)
ans = lcm(T[0], T[1])
for i in range(2,N-1):
    ans = lcm(ans, T[i])
print(ans)
Problem p02783 (python)

Fixed submission:
H, A = input().split()
H = int(H) 
A = int(A)
if(H <= A):
  	answer = 1
else:
	answer = int(H / A)
	if( H % A != 0):
  		answer += 1

print(answer)

Buggy submission (verdict: Runtime Error):
H, A = input().split()

print(int(H/A)+1)
Problem p02802 (python)

Fixed submission:
def resolve_c():
    n, m = map(int, input().split())
    ac_list = [0] * n
    wa_list = [0] * n
    wa_tmp_list = [0] * n
    for i in range(m):
        p, s = input().split()
        if ac_list[int(p)-1] == 0:
            if s == "AC":
                ac_list[int(p)-1] = 1
                wa_list[int(p)-1] = wa_tmp_list[int(p)-1]
            elif s == "WA":
                wa_tmp_list[int(p)-1] += 1
    print(str(sum(ac_list)) + " " + str(sum(wa_list)))
resolve_c()

Buggy submission (verdict: Runtime Error):
def resolve_c():
    n, m = map(int, input().split())
    ac_list = [0] * m
    wa_list = [0] * m
    wa_tmp_list = [0] * m
    for i in range(m):
        p, s = input().split()
        if ac_list[int(p)] == 0:
            if s == "AC":
                ac_list[int(p)] = 1
                wa_list[int(p)] = wa_tmp_list[int(p)]
            elif s == "WA":
                wa_tmp_list[int(p)] += 1
    print(str(sum(ac_list)) + " " + str(sum(wa_list)))
resolve_c()

Buggy submission (verdict: Runtime Error):
def resolve_c():
    n, m = map(int, input().split())
    ac_list = [0] * m
    wa_list = [0] * m
    wa_tmp_list = [0] * m
    for i in range(m):
        p, s = input().split()
        if ac_list[int(p)] == 0:
            if s == "AC":
                ac_list[int(p)] = 1
                wa_list[int(p)] = wa_tmp_list[int(p)]
            elif s == "WA":
                wa_tmp_list[int(p)] += 1
    print(str(sum(ac_list)) + " " + str(sum(wa_list)))
resolve_c()
Problem p03470 (python)

Fixed submission:
n = input()
mochi = [input() for i in range(int(n))]
print(len(set(mochi)))

Buggy submission (verdict: Runtime Error):
n = input()
mochi = [input() for i in range(int(n))]
print(len(set(mochi))
Problem p03493 (python)

Fixed submission:
s = input()
count = 0
if s[0] == "1":
  count+=1
if s[1] == "1":
  count+=1
if s[2] == "1":
  count+=1
  
print(count)

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

flg_break = True

while flg_break:
    count = 0
    num_tmp_list = []
    for n in num_list:
        print(n)
        if n % 2 != 0:
            flg_break = False
            break
        else:
            num_tmp = n / 2
            num_tmp_list.append(num_tmp)
    num_list = num_tmp_list
    count+=1

print(count)
Problem p03494 (python)

Fixed submission:
s = input()
num_list = list(map(int, input().split()))

flg_break = True

count = -1
while flg_break:
    count+=1
    num_tmp_list = []
    for n in num_list:
        if n % 2 != 0:
            flg_break = False
            break
        else:
            num_tmp = n / 2
            num_tmp_list.append(num_tmp)
    num_list = num_tmp_list
    

print(count)

Buggy submission (verdict: Runtime Error):
s = input()
num_list = list(map(int, input().split()))
count = -1
while flg_break:
    count+=1
    num_tmp_list = []
    for n in num_list:
        if n % 2 != 0:
            flg_break = False
            break
        else:
            num_tmp = n / 2
            num_tmp_list.append(num_tmp)
    num_list = num_tmp_list
print(count)
Problem p02772 (python)

Fixed submission:
import sys
N=int(input())
A=list(map(int,input().split()))
flag=True
for i in range(N):
    if A[i]%2==0:
        if A[i]%3!=0 and A[i]%5!=0:
            flag=False
if flag==True:
    print('APPROVED')
else:
    print('DENIED')

Buggy submission (verdict: Runtime Error):
import sys
N=int(input())
A=list(map(int,input().split()))
flag=True
for i in range(N):
    if A[i]%2==0:
        if A[i]%3!=0 or A[i]%5!=0:
            flag=False
if flag==True:
    print('APPROVED')
else:
    print('DENIED'
Problem p02969 (python)

Fixed submission:
r=int(input())
print(r*r*3)

Buggy submission (verdict: Runtime Error):
N=int(input())
a=[0]*N
maxim=[0]*N
for i in range(N):
    a[i]=int(input())
maxim=sorted(list(a), reverse=True)
for k in range(N):
    if a[k]!=maxim[0]:
        print(maxim[0])
    else:
        print(maxim[1])

Buggy submission (verdict: Runtime Error):
N=int(input())
a=[0]*(N)
maxim=[0]*(N)
for i in range(N):
    a[i]=int(input())
maxim=sorted(list(a), reverse=True)
for k in range(N):
    if a[k]!=maxim[0]:
        print(maxim[0])
    else:
        print(maxim[1])
Problem p02981 (python)

Fixed submission:

i=list(map(int,input().split()))
if i[2]>i[0]*i[1]:
    print(i[0]*i[1])
else:
    print(i[2])

Buggy submission (verdict: Runtime Error):
i=list(int,input().split())
if i[0]*i[1]>i[2]:
    print(i[0]*i[1])
elif:
    print(i[2])
Problem p03280 (python)

Fixed submission:
A,B=map(int,input().split())
print(A*B-A-B+1)

Buggy submission (verdict: Runtime Error):
A,B=map(int,input()split())
print(A*B-A-B+1)
Problem p03288 (python)

Fixed submission:
# coding: utf-8
# Your code here!

R=input()
r=int(R)
if r<1200:
    print("ABC")
elif r<2800:
    print("ARC")
else:
    print("AGC")

Buggy submission (verdict: Runtime Error):
# coding: utf-8
#codebegin
R=input()
r=int(R)
if r<1200:
    print("ABC"):
if r>(1200-1) and r<2800:
    print("ARC")
if r>(2800-1):
    print("AGC")

Buggy submission (verdict: Runtime Error):
# using-utf8
#codebegin
R=input()
r=int(R)
if r<1200:
    print("ABC"):
if r>(1200-1) and r<2800:
    print("ARC")
if r>(2800-1):
    print("AGC")
Problem p03293 (python)

Fixed submission:
S=input()
T=input()
S=S*2
if T in S:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
S=input()
T=input()
S=S[::-1]
if S=T:
  print("Yes")
else:
  print("No")
Problem p03316 (python)

Fixed submission:
N=input()
wa=0
for i in N:
  wa+=int(i)
if (int(N)%wa)==0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N=int(input())
n=list(str(N))
n=[int(n) for i in n]
summer=sum(n)
if N%summer==0:
  print("Yes")
else:
  print("No")
Problem p03323 (python)

Fixed submission:
A,B=map(int,input().split())
if (A>8) or (B>8):
  print(":(")
else:
  print("Yay!")

Buggy submission (verdict: Runtime Error):
D,N=map(int,input()split())

if N<100:
  print(100**D*N)
else:
  print(100**D*101)

Buggy submission (verdict: Runtime Error):
D,N=map(int,input()split())

if N<100:
  print(pow(100,D)*N)
else:
  print(pow(100,D)*101)

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

if N<100:
  print(pow(100,D)*N)
else:
  print(pow(100,D)*101)

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split)
if (A>8) or (B>8):
  print(":(")
else:
  print("Yay!")

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split)
if A>8 or B>8:
  print(":(")
else:
  print("Yay!")
Problem p03324 (python)

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

if N<100:
  print(100**D*N)
else:
  print(100**D*101)

Buggy submission (verdict: Runtime Error):
D,N=map(int,input()split())

if N<100:
  print(100**D*N)
else:
  print(100**D*101)

Buggy submission (verdict: Runtime Error):
D,N=map(int,input()split())

if N<100:
  print(pow(100,D)*N)
else:
  print(pow(100,D)*101)
Problem p02802 (python)

Fixed submission:
n, m = list(map(int, input().split()))
ac = set()
wa = {}
for i in range(m):
  p, s = input().split()
  p = int(p)
  if p in ac:
    continue
  if s == 'WA':
    wa[p] = wa.get(p, 0) + 1
  else:
    ac.add(p)
pe = 0
for p in set(ac) & set(wa.keys()):
    pe += wa[p]
print("%d %d" % (len(ac), pe))

Buggy submission (verdict: Runtime Error):
n, m = list(map(int, input().split()))
ac = set()
wa = 0
for i in range(m):
  p, s = input.split()
  p = int(p)
  if p in ac:
    continue
  if s == 'WA':
    wa += 1
  else:
    ac.add(p)
print("%d %d" % (len(ac), wa))