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

Fixed submission:
num = input()
if num.isdecimal():
    if int(num) <= 999:
        first_class_num = int(num[-1])
        if first_class_num in {2, 4, 5, 7, 9}:
            print("hon")
        elif first_class_num in {0, 1, 6, 8}:
            print("pon")
        elif first_class_num is 3:
            print("bon")

Buggy submission (verdict: Runtime Error):
import math
# 時針の速度
# 360度/720分 = 1/2度/m
# 分針の速度
# 360度/60分 = 6度/m
# 時針と分針の度数は両者を減算したものの絶対値
# 使用するのは余弦定理

# def str_to_int(str_num):
#     int_num = int(str_num)
#     return int_num


line = input().split(' ')
# int_line = list(map(lambda str_num: int(str_num), line))
int_line = [int(str_num) for str_num in line]
# print(int_line)

# 時針の進行角度
# radian_h =　(H * 60 + M) * 0.5
# radian_m = M * 6

# 時針と分針の角度
degree = abs((int_line[2] * 60 + int_line[3]) * 0.5 - int_line[3] * 6)

# 分針と時針の末端同士の距離
distance_squared = int_line[0] ** 2 + int_line[1] ** 2 - 2 * \
    int_line[0] * int_line[1] * math.cos(math.radians(degree))

distance = math.sqrt(distance_squared)

print(distance)

Buggy submission (verdict: Runtime Error):
import math
# 時針の速度
# 360度/720分 = 1/2度/m
# 分針の速度
# 360度/60分 = 6度/m
# 時針と分針の度数は両者を減算したものの絶対値
# 使用するのは余弦定理

# def str_to_int(str_num):
#     int_num = int(str_num)
#     return int_num


line = input().split(' ')
# int_line = list(map(lambda str_num: int(str_num), line))
int_line = [int(str_num) for str_num in line]
print(int_line)

# 時針の進行角度
# radian_h =　(H * 60 + M) * 0.5
# radian_m = M * 6

# 時針と分針の角度
degree = abs((int_line[2] * 60 + int_line[3]) * 0.5 - int_line[3] * 6)

# 分針と時針の末端同士の距離
distance_squared = int_line[0] ** 2 + int_line[1] ** 2 - 2 * \
    int_line[0] * int_line[1] * math.cos(math.radians(degree))

distance = math.sqrt(distance_squared)

# print(distance)
Problem p02681 (python)

Fixed submission:
s = input()
t = input()
u = t[:-1]
out = ('No', 'Yes')[s == u]
print(out)

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
u = t.rstip(t[len(t) - 1])
out = ('No', 'Yes')[s == u]
print(out)
Problem p03470 (python)

Fixed submission:
N = int(input())
a = list(range(N))
for i in range(N):
    a[i] = int(input())
a.sort()
p = 1
for i in range(N - 1):
    if a[i + 1] - a[i] != 0:
        p += 1
print(p)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(range(N))
for i in range(N):
    a[i] = int(input())
a = a.sort()
p = 1
for i in range(N - 1):
    if a[i + 1] - a[i] != 0:
        p += 1
print(p)
Problem p03471 (python)

Fixed submission:
n, y = map(int, input().split())
for i in range(n + 1):
  for ii in range(n - i + 1):
    if 10000 * i + 5000 * ii + 1000 * (n - i - ii) == y:
      print('{} {} {}'.format(i, ii, n - i - ii))
      exit()
print('-1 -1 -1')

Buggy submission (verdict: Runtime Error):
 = map(int, input().split())
for i in range(n + 1):
  for ii in range(n - i + 1):
    if 10000 * i + 5000 * ii + 1000 * (n - i - ii) == y:
      print('{} {} {}'.format(i, ii, n - i - ii))
      exit()
print('-1 -1 -1')
Problem p03493 (python)

Fixed submission:
s = input()
print(int(s[0]) + int(s[1]) + int(s[2]))

Buggy submission (verdict: Runtime Error):
# 数値の入力
a, b, c = map(int, input().split())
if a < 0 or b < 0 or c < 0:
    print("false")
if a > 1 or b > 1 or c > 1:
    print("false")
else:
    print("{}".format(a+b+c))
Problem p02741 (python)

Fixed submission:
k = int(input()) - 1
li = [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(li[k])

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split())

if h == 1 or w == 1:
    print(1)
    exit()

if h * w % 2 == 0:
    print(h * w // 2)
else:
    print((h * w)//2 + 1)
Problem p03998 (python)

Fixed submission:
a_card = list(input())
b_card = list(input())
c_card = list(input())

turn = 'a'
while True:
    if turn == 'a':
        if len(a_card) == 0:
            print('A')
            exit()
        turn = a_card.pop(0)

    elif turn == 'b':
        if len(b_card) == 0:
            print('B')
            exit()
        turn = b_card.pop(0)

    else:
        if len(c_card) == 0:
            print('C')
            exit()
        turn = c_card.pop(0)

Buggy submission (verdict: Runtime Error):
a_card = list(input())
b_card = list(input())
c_card = list(input())

turn = 'a'
while True:
    if turn == 'a':
        turn = a_card.pop(0)
        print(a_card, b_card, c_card)
        if len(a_card) == 0:
            print('A')
            exit()
    elif turn == 'b':
        turn = b_card.pop(0)
        print(a_card, b_card, c_card)
        if len(a_card) == 0:
            print('B')
            exit()
    else:
        turn = c_card.pop(0)
        print(a_card, b_card, c_card)
        if len(a_card) == 0:
            print('C')
            exit()
Problem p02675 (python)

Fixed submission:
n = int(input())
rem = n%10
if rem == 3:
  print("bon")
elif rem == 0 or rem == 1 or rem == 6 or rem == 8:
  print("pon")
else:
  print("hon")

Buggy submission (verdict: Runtime Error):
nm = list(map(int,input().split()))
n = nm[0]
m = nm[1]
a = []
b = []
for i in range(0, m):
    ab = list(map(int,input().split()))
    a.append(ab[0])
    b.append(ab[1])
signs = [0]*(n+1)
signs[1]=-1
now = [1]
nexx = []
while True:
    for i in now:
        for j in range(0,m):
            if a[j] == i:
                if signs[b[j]] == 0:
                    signs[b[j]] = i
                    nexx.append(b[j])
            elif b[j] == i:
                if signs[a[j]] == 0:
                    signs[a[j]] = i
                    nexx.append(a[j])
    now=nexx.copy()
    if len(nexx)==0:
        break
    nexx = []
flag = 0
for i in range(2, n+1):
    if signs[i]==0:
        print("No")
        flag = 1
        break
if flag == 0:
    print("Yes")
    for k in range(2,n+1):
        print(signs[k])

Buggy submission (verdict: Runtime Error):
nm = list(map(int,input().split()))
n = nm[0]
m = nm[1]
a = []
b = []
for i in range(0, m):
    ab = list(map(int,input().split()))
    a.append(ab[0])
    b.append(ab[1])
signs = [0]*(n+1)
signs[1]=-1
now = [1]
nexx = []
while True:
    for i in now:
        for j in range(0,m):
            if a[j] == i:
                if signs[b[j]] == 0:
                    signs[b[j]] = i
                    nexx.append(b[j])
            elif b[j] == i:
                if signs[a[j]] == 0:
                    signs[a[j]] = i
                    print("signs=",signs)
                    nexx.append(a[j])
    now=nexx.copy()
    if len(nexx)==0:
        break
    nexx = []
flag = 0
for i in range(2, n+1):
    if signs[i]==0:
        print("No")
        flag = 1
        break
if flag == 0:
    print("Yes")
    for k in range(2,n+1):
        print(signs[k])
Problem p03323 (python)

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

if abs(a-b) < 2:
    print("Yay!")
else:
    print(":(")

Buggy submission (verdict: Runtime Error):
a, b = map(int(input()))

if abs(a-b) < 2:
    print("Yay!")
else:
    printa, b = map(int, input().split())

if abs(a-b) < 2:
    print("Yay!")
else:
    print(":(")

Buggy submission (verdict: Runtime Error):
a, b = map(int(input()))

if abs(a-b) < 2:
    print("Yay!")
else:
    print(":(")
Problem p03361 (python)

Fixed submission:
h, w = map(int, input().split())
pict = [[0]*(w+2) for _ in range(h+2)]

for y in range(1, h+1):
    pict[y][1:w+1] = list(input())
ans = "Yes"
for y in range(h):
    for x in range(w):
        if pict[y][x] == "#":
            if pict[y-1][x] == "." and pict[y+1][x] == "." and pict[y][x-1] == "." and pict[y][x+1] == ".":
                ans = "No"
print(ans)

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split())
pict = [[0]*(w+2) for _ in range(h+2)]

for y in range(1, h+1):
    pict[y][1:w+1] = list(input())
ans = "Yes"
for y in range(h):
    for x in range(w):
        if pict[x][y] == "#":
            if pict[x-1][y] == "." and pict[x+1][y] == "." and pict[x][y-1] == "." and pict[x][y+1] == ".":
                ans = "No"
print(ans)
Problem p03564 (python)

Fixed submission:
N = int(input())
K = int(input())
number = 1

for i in range(N):
    if number * 2 < number + K:
        number = number * 2
    else:
        number = number + K

print(number)

Buggy submission (verdict: Runtime Error):
N = int(input())
K = int(input())
number = 1

for i in N:
    if number * 2 < number + K:
        number = number * 2
    else:
        number = number + K

print(number)
Problem p03284 (python)

Fixed submission:
n,k = map(int, input().split())
 
if n%k == 0:
    sabun = 0
else:
    sabun = 1
print(sabun)

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

if n%k == 0:
    sabun == 0
else:
    min_mai = n//k
    max_mai = min_mai + n%k
    sabun = max_mai- min_mai
print(sabun)

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

if n%k == 0:
    sabun == 0
else:
    min_mai = n//k
    max_mai = min_mai + n%k
    sabun = max_mai- min_mai
print(sabun)
Problem p03623 (python)

Fixed submission:
x,a,b = map(int, input().split())

if abs(x-a) > abs(x-b):
    print('B')
else:
    print('A')

Buggy submission (verdict: Runtime Error):
x,a,b = map(int, input().split())

if abs(x-a) > abs(x-b):
    print(B)
else:
    print(A)
Problem p02789 (python)

Fixed submission:
mn = input().split(' ')
print('Yes') if int(mn[0]) == int(mn[1]) else print('No')

Buggy submission (verdict: Runtime Error):


ab = input().split(' ')
a = ''
if ord(ab[0]) > ord(ab[1]):
  for i in range(int(ab[0])):
    a += ab[1]
else:
  for i in range(int(ab[1])):
    a += ab[0]
    
print(a)
Problem p02791 (python)

Fixed submission:
n = int(input())
seq = [int(e) for e in input().split(' ')]

count = 1

current_min = seq[0]

for idx, i in enumerate(seq[1:]):
  if i < current_min:
    current_min = i
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
'''
n = int(input())
seq = [int(e) for e in input().split(' ')]

count = 0
for i in seq:
  number_loop = len(seq[0:seq.index(i)+1])
  for idx, j in enumerate(seq[0:seq.index(i)+1]):
    if i > j:
      break
    if idx+1 == number_loop:
      count += 1
      
print(count)
'''

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

count = 1

for idx, i in enumerate(seq[1:]):
  if i > seq[idx+2]:
   continue
  else:
    count += 1
print(count)
Problem p02802 (python)

Fixed submission:
import sys

N, M = input().split(' ')
p_acwa_dict = {}
cnt_ac = 0
cnt_wa = 0
pre_p = 0
for line in sys.stdin:
  p, s = line.rstrip().split()
  p = int(p)
      
  pre_p = p
  acwa_cnt_dict = p_acwa_dict.setdefault(p, {'AC': 0, 'WA': 0})
  
  if acwa_cnt_dict['AC'] > 0:
    continue
    
  if s == 'AC':
    acwa_cnt_dict['AC'] += 1
    cnt_ac += 1
    cnt_wa += acwa_cnt_dict['WA']
  elif s == 'WA':
    acwa_cnt_dict['WA'] += 1

print("{} {}".format(cnt_ac, cnt_wa))

Buggy submission (verdict: Runtime Error):
import sys

N, M = input().split(' ')
p_acwa_dict = {}
cnt_ac = 0
cnt_wa = 0
pre_p = 0
for line in sys.stdin:
  p, s = line.rstrip().split()
  p = int(p)
  
  if pre_p > 0 and pre_p != p:
    pre_acwa_cnt_dict = p_acwa_dict[pre_p]
    if pre_acwa_cnt_dict['AC'] > 0:
      cnt_ac += pre_acwa_cnt_dict['AC']
      cnt_wa += pre_acwa_cnt_dict['WA']
      
  pre_p = p
  acwa_cnt_dict = p_acwa_dict.setdefault(p, {'AC': 0, 'WA': 0})
  if acwa_cnt_dict['AC'] > 0:
    continue
  acwa_cnt_dict[s] += 1

pre_acwa_cnt_dict = p_acwa_dict[pre_p]
if pre_acwa_cnt_dict['AC'] > 0:
  cnt_ac += pre_acwa_cnt_dict['AC']
  cnt_wa += pre_acwa_cnt_dict['WA']
print("{} {}".format(cnt_ac, cnt_wa))
Problem p02675 (python)

Fixed submission:
n = int(input())
d = int(str(n)[-1])
t = {'bon':[3], 'pon':[0,1,6,8], 'hon':[2,4,5,7,9]}
for s in t:
  if d in t[s]:
    print(s)

Buggy submission (verdict: Runtime Error):
n = input()
x = n%10
if x == 3 :
  print("bon")
else x == 0 || x == 1 || x == 6 || x == 8 :
  print("pon")
else :
  print("hon")
Problem p02681 (python)

Fixed submission:
s = input()
t = input()
if s == t[:-1]:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
s = input
t = input
if s[-1] = ["t"]:
    print("yes")
else:
    print("no")
Problem p02687 (python)

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

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

Fixed submission:
i = int(input())
s = i % 10
if s in [2, 4, 5, 7, 9]:
  print("hon")
elif s in [0, 1, 6, 8]:
  print("pon")
else:
  print("bon")

Buggy submission (verdict: Runtime Error):
import numpy as np
import math 
A, B, H, M = map(int, input().split())

pai = math.pi
angle = 2*pai*((H+M/60)/12 - M/60)

distance = np.sqrt(A**2+B**2-2*A*B*np.cos(angle))
print(distance)

Buggy submission (verdict: Runtime Error):
K = int(input())
S = input()

if (len(S) <= K):
  print(S)
else:
  S = S[0:K] + "..."
  print(S)
Problem p02677 (python)

Fixed submission:
import numpy as np
import math 
A, B, H, M = map(int, input().split())

pai = math.pi
angle = 2*pai*((H+M/60)/12 - M/60)

distance = np.sqrt(A**2+B**2-2*A*B*np.cos(angle))
print(distance)

Buggy submission (verdict: Runtime Error):
import numpy as np
A = int(input())
B = int(input())
H = int(input())
M = int(input())

pai = 3.14
angle = 2*pai*(H/12- M/60)

distance = np.sqrt(A**2+B**2-2*A*B*np.cos(angle))
print(distance)
Problem p03086 (python)

Fixed submission:
import  re

ss = input()
ps = r"A|C|G|T"

seq = []
counter = 0
for s in ss:
    if re.match(ps, s):
        counter += 1
        seq.append(counter)
    else:
        counter = 0
seq.append(counter)
print(max(seq))

Buggy submission (verdict: Runtime Error):
import  re

ss = input()
ps = r"A|C|G|T"

seq = []
counter = 0
for s in ss:
    if re.match(ps, s):
        counter += 1
        seq.append(counter)
    else:
        counter = 0
    
print(max(seq))

Buggy submission (verdict: Runtime Error):
ss = input()
ps = "ACGT"

seq = []
counter = 0
for s in ss:
    if s in ps:
        counter += 1
        seq.append(counter)
    else:
        counter = 0
    
print(max(seq))

Buggy submission (verdict: Runtime Error):
ss = input()
ps = "ACGT"

seq = []
counter = 0
for s in ss:
    if s in ps:
        counter += 1
        seq.append(counter)
    else:
        counter = 0
    
print(max(seq))
Problem p02675 (python)

Fixed submission:
s = input()
bonlist = ["3"]
ponlist = ["0","1","6","8"]
if str(s)[-1] in bonlist:
  	print("bon")
elif str(s)[-1] in ponlist:
  	print("pon")
else:
  	print("hon")

Buggy submission (verdict: Runtime Error):
s = input()
print(S)
Problem p02921 (python)

Fixed submission:
S = input()
T = input()
count = 0
forecastlist = []
realweatherlist = []
for forecast in S:
  forecastlist.append(forecast)
for weather in T:
  realweatherlist.append(weather)
  
for i in range(3):
  if forecastlist[i] == realweatherlist[i]:
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
A,B = map(int, input().split())
count = 0
socketnumber = A
while socketnumber < B:
    socketnumber += (A-1)
    count += 1
count += 1
print (count)
Problem p02830 (python)

Fixed submission:
n = int(input())
line = input().split(" ")
 
s = line[0]
t = line[1]
 
for i in range(0, len(s)): 
  print(s[i], end="")
  print(t[i], end="")

Buggy submission (verdict: Runtime Error):
n = int(input())
line = input().split(" ")

s = line[0]
t = line[1]

for i in range(0, len(s)) 
	print(s[i], end="")
  	print(t[i], end="")

Buggy submission (verdict: Runtime Error):
s = input()
t = input()

for i in range(0, len(s)) 
	print(s[i], end="")
  	print(s[i], end="")
Problem p02675 (python)

Fixed submission:
import sys
 
def main():
  N = str(input())
  L = [0,1,6,8]
  n_last = int(N[-1])
  if n_last == 3:
    print("bon")
  elif (n_last in L):
    print("pon")
  else:
    print("hon")
 
    
main()

Buggy submission (verdict: Runtime Error):
import sys
 
def main():
  N = int(input())
  L = [0,1,6,8]
  n_last = int(N[-1])
  if n_last == 3:
    print("bon")
  elif (n_last in L):
    print("pon")
  else:
    print("hon")
 
    
main()

Buggy submission (verdict: Runtime Error):
import sys

def main():
  N = int(input())
  L = [0,1,6,8]
  
  if N[-1] == 3:
    print("bon")
  elif N[-1] in L:
    print("pon")
  else:
    print("hon")
 
    
main()

Buggy submission (verdict: Runtime Error):
import sys
 
L = [0,1,6,8]
 
def main():
  N = int(input())
  
  if N[-1] == 3:
    print("bon")
  elif N[-1] in L:
    print("pon")
  else:
    print("hon")
 
    
main()

Buggy submission (verdict: Runtime Error):
import sys
 
 
def main():
  N = int(input())
  
  if N[-1] == 3:
    print("bon")
  elif N[-1] in (0,1,6,8):
    print("pon")
  else:
    print("hon")
 
    
main()

Buggy submission (verdict: Runtime Error):
import sys

L = [0,1,6,8]

def main():
  N = int(input())
  
  if N[-1] == 3:
    print("bon")
  elif N[-1] in [0,1,6,8]:
    print("pon")
  else:
    print("hon")

    
main()
Problem p02783 (python)

Fixed submission:
import sys
import socket

hostname = socket.gethostname()

if hostname == 'F451C':
    sys.stdin = open('a1.in')


def read_int_list():
    return list(map(int, input().split()))


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    H, A = read_int_list()
    res = 0
    for i in range(10001):
      H = H - A
      res += 1
      if H <= 0:
        break
    print(res)


main()

Buggy submission (verdict: Runtime Error):
import sys
import socket

hostname = socket.gethostname()

if hostname == 'F451C':
    sys.stdin = open('a1.in')


def read_int_list():
    return list(map(int, input().split()))


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    H, A = read_int_list()
    res = 0
    for i in range(n):
      H = H - A
      res += 1
      if H <= 0:
        break
    print(res)


main()

Buggy submission (verdict: Runtime Error):
import sys
import socket

hostname = socket.gethostname()

if hostname == 'F451C':
    sys.stdin = open('a1.in')


def read_int_list():
    return list(map(int, input().split()))


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    H, A = read_int_list()
    res = 0
    for i in range(n):
      H = H - A
      res += 1
    if H <= 0:
      break
    print(res)


main()

Buggy submission (verdict: Runtime Error):
import sys
import socket

hostname = socket.gethostname()

if hostname == 'F451C':
    sys.stdin = open('a1.in')


def read_int_list():
    return list(map(int, input().split()))


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    H, A = read_int_list
    res = 0
    for i in range(n):
      H = H - A
      res += 1
    if H <= 0:
      break
    print(res)


main()
Problem p02789 (python)

Fixed submission:
import sys
import socket

hostname = socket.gethostname()

if hostname == 'F451C':
    sys.stdin = open('a1.in')


def read_int_list():
    return list(map(int, input().split()))


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    n, m = read_int_list()
    if n > m:
      res = 'No'
    else:
      res = 'Yes'
    print(res)


main()

Buggy submission (verdict: Runtime Error):
N = input(int)
M = input(int)
if N == M:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
def P(N, M):
  if N = M:
    print('Yes')
  else:
    print('No')

Buggy submission (verdict: Runtime Error):
def P(N, M):
  if N > M;
  	return No
  return Yes
Problem p03591 (python)

Fixed submission:
import sys
import socket

hostname = socket.gethostname()

if hostname == 'F451C':
    sys.stdin = open('a1.in')


def read_int_list():
    return list(map(int, input().split()))


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    s = read_str()
    if s[0:4] == 'YAKI':
        print('Yes')
    else:
        print('No')


main()

Buggy submission (verdict: Runtime Error):
import sys
import socket

hostname = socket.gethostname()

if hostname == 'F451C':
    sys.stdin = open('a1.in')


def read_int_list():
    return list(map(int, input().split()))


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    s = read_str()
    if s[0] == 'Y' and s[1] == 'A' and s[2] == 'K' and s[3] == 'I':
        print('Yes')
    else:
        print('No')


main()
Problem p03625 (python)

Fixed submission:
import sys
from collections import Counter

# sys.stdin = open('c1.in')


def read_int_list():
    return list(map(int, input().split()))


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    n = read_int()
    a = read_int_list()
    a.sort()
    c = Counter(a)
    l = set()
    for i in a:
        if c[i] >= 2:
            l.add(i)
    l = list(l)
    l.sort()

    res = 0
    if len(l) >= 1:
        m = l[-1]
        if c[m] >= 4:
            res = m * m
        else:
            if len(l) >= 2:
                p = l[-2]
                res = m * p
    print(res)


main()

Buggy submission (verdict: Runtime Error):
import sys
from collections import Counter

# sys.stdin = open('c1.in')


def read_int_list():
    return list(map(int, input().split()))


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    n = read_int()
    a = read_int_list()
    a.sort()
    c = Counter(a)
    l = set()
    for i in a:
        if c[i] >= 2:
            l.add(i)
    l = list(l)
    l.sort()

    res = 0
    if len(l) >= 1:
        m = l[-1]
        if c[m] >= 4:
            res = m * m
        else:
            if len(l) >= 2:
                p = l[-2]
                res = m * p
    print(res)
import sys
from collections import Counter

# sys.stdin = open('c1.in')


def read_int_list():
    return list(map(int, input().split()))


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    n = read_int()
    a = read_int_list()
    a.sort()
    c = Counter(a)
    l = set()
    for i in a:
        if c[i] >= 2:
            l.add(i)
    l = list(l)
    l.sort()

    res = 0
    if len(l) >= 1:
        m = l[-1]
        if c[m] >= 4:
            res = m * m
        else:
            if len(l) >= 2:
                p = l[-2]
                res = m * p
    print(res)


main()


main()
Problem p03697 (python)

Fixed submission:
r = list(map(int, input().split()))
s = sum(r)
if s > 9:
    res = 'error'
else:
    res = s
print(res)

Buggy submission (verdict: Runtime Error):
import math

N, A, B = [int(_) for _ in input().split()]
H = sorted([int(input()) for _ in range(N)])

sup = 10 ** 9
inf = 0

while sup - inf > 1:
    x = (sup + inf) // 2
    c = sum([math.ceil((h - x * B) / (A - B)) for h in H if h > x * B])
    if c <= x:
        sup = x
    else:
        inf = x

print(sup)
Problem p03730 (python)

Fixed submission:
import sys

# sys.stdin=open('b1.in')

a, b, c = map(int, input().split())

res = 'NO'
for k in range(1, b + 1):
    if k * a % b == c:
        res = 'YES'
        break
print(res)

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

# sys.stdin = open('b1.in')

a, b, c = map(int, input().split())

d = gcd(a, b)
if c % d == 0:
    print('YES')
else:
    print('NO')