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

Fixed submission:
n=int(input())
p=list(map(int,input().split()))
a=p[0]
cnt=1
for i in range(1,n):
	if p[i]<a:
		cnt+=1
		a=p[i]
print(cnt)

Buggy submission (verdict: Runtime Error):
n=int(input())
p=list(map(int,input().split()))
ans=p[0]
cnt=1
for i in range(1,n):
	if p[i]<a:
		cnt+=1
		a=p[i]
print(cnt)
Problem p02848 (python)

Fixed submission:

n = int(input())
s = input()
ans=[]
a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
a_list=[]
for j in a:
	a_list.append(j)
for i in range (len(s)):
	ans.append(a_list[a_list.index(s[i])+n].upper())
print("".join(ans))

Buggy submission (verdict: Runtime Error):
s = input()
n = int(input())
ans=[]
a = "ABCDEFGHIJKLMNOPQRSTUWVXYZabcdefghijklmnopqrstuwvxyz"
a_list=[]
for j in a:
	a_list.append(j)
for i in range (len(s)):
	ans.append(a_list[a_list.index(s[i])+n])
ans=ans.upper()
print("".join(ans))

Buggy submission (verdict: Runtime Error):
s = input()
n = int(input())
ans=[]
a = "ABCDEFGHIJKLMNOPQRSTUWVXYZABCDEFGHIJKLMNOPQRSTUWVXYZ"
a_list=[]
for j in a:
	a_list.append(j)
for i in range (len(s)):
	ans.append(a_list[int(a_list.index(s[i]))+n])
print("".join(ans))

Buggy submission (verdict: Runtime Error):
s = input()
n = int(input())
ans=[]
a = "ABCDEFGHIJKLMNOPQRSTUWVXYZABCDEFGHIJKLMNOPQRSTUWVXYZ"
a_list=[]
for j in a:
	a_list.append(j)
for i in range (len(s)):
	ans.append(a_list[a_list.index(s[i])+n])
print("".join(ans))

Buggy submission (verdict: Runtime Error):
s = input()
n = int(input())
ans=[]
a_list = "ABCDEFGHIJKLMNOPQRSTUWVXYZABCDEFGHIJKLMNOPQRSTUWVXYZ"
for i in range (len(s)):
	ans.append(a_list[a_list.index(s[i])+n])
print("".join(ans))
Problem p02886 (python)

Fixed submission:
N = int(input())
l = list(map(int, input().split()))
sum = 0
for i in range((N*(N-1))//2):
    for j in range(i+1,N):
        a = l[i]*l[j]
        sum+=a
print(sum)

Buggy submission (verdict: Runtime Error):
N = int(input())
l = list(map(int, input().split()))
sum = 0
for i in range((N*(N-1))//2):
    for j in range(i):
        a = l[i]*l[j]
        sum+=a
print(sum)
Problem p02898 (python)

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

Buggy submission (verdict: Runtime Error):
n,k = int(input())
h = list(map(int,input().split()))
cnt=0
for i in range(n):
	if k<=h[i]:
		cnt+=1
print(cnt)

Buggy submission (verdict: Runtime Error):
N_K = list(map(int, input().split()))#N_K[0]=N , N_K[1]=K
h = list(map(int,input().split()))# h[N]
ans = 0
for i in range(N_K[0])
	if h[i] >= N_K[1]:
		ans+=1
print(ans)
Problem p02909 (python)

Fixed submission:
s = input()
s_list=("Sunny","Cloudy","Rainy","Sunny")
tom = s_list.index(s)+1
print(s_list[tom])

Buggy submission (verdict: Runtime Error):
s = input()
s_list=("Sunny","Cloudy","Rainy")
tom = s_list.index(s)+1
print(s_list[tom])
Problem p02921 (python)

Fixed submission:
s = input()
t = input()
ans  =0
for i in range(3):
	if s[i]==t[i]:
		ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
i=1
sum = a
if sum<=b:
	while sum<=b:
		sum+=a-1
		i+=1
print(i)
Problem p02922 (python)

Fixed submission:
a,b = map(int, input().split())
i=0
sum = 1

while sum<b:
	sum+=a-1
	i+=1
print(i)

Buggy submission (verdict: Runtime Error):
a_b = list(map(int, input()))
i=1
sum = a_b[0]
if sum<=a_b[1]:
	for sum>=a_b[1]:
		sum+=a_b[0]-1
		i++
print(i)
Problem p02934 (python)

Fixed submission:
N = int(input())
A = list(map(int ,input().split()))
sum=0
for i in range(N):
	sum+=A[i]/(A[i]**2)
sum=1/sum
print(sum)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(float ,input().split()))
sum=float(0)
for i in range(N)
	sum+=A[i]/(A[i]**2)
sum=sum**sum
print(sum)
Problem p02981 (python)

Fixed submission:
n,a,b = map(int, input().split())
ans=b
tr = n*a
if tr < b:
	ans=tr
print(ans)

Buggy submission (verdict: Runtime Error):
n,a,b = map(int, input().split())
ans=b
tr = n*a
if tr < b
	ans=tr
print(ans)
Problem p02993 (python)

Fixed submission:
s = input()

ans="Good"
for i in range(3):
	if s[i]==s[i+1]:
		ans="Bad"
print(ans)

Buggy submission (verdict: Runtime Error):
s = input()
ans="Good"
for i in range(4):
	if s[i]==s[i+1]:
		ans="Bad"
print(ans)

Buggy submission (verdict: Runtime Error):
s = input()
ans="Good"
for i in range(len(s)):
	if s[i]==s[i+1]:
		ans="Bad"
print(ans)

Buggy submission (verdict: Runtime Error):
s = input()
ans="Good"
for i in range(len(s))
	if s[i]==s[i+1]:
		ans="Bad"
print(ans)

Buggy submission (verdict: Runtime Error):
s = int(input())
s_list = list(s)
ans="Good"
for i in range(len(s))
	if s_list[i]==s_list[i+1]:
		ans="Bad"
print(ans)
Problem p03030 (python)

Fixed submission:
from collections import defaultdict
n=int(input())

rest=defaultdict(list)
for i in range(n):
	s,h=input().split()
	rest[s].append([int(h),i+1])
for k in sorted(list(rest.keys())):
	for p,i in sorted(list(rest[k]),key=lambda x:x[0])[::-1]:
		print(i)

Buggy submission (verdict: Runtime Error):

n=int(input())
for i in range(n):
	rest=list(input().split())
a=rest
rest.sort()
for i in range(n):
	print(rest.index(a[i]))

Buggy submission (verdict: Runtime Error):

n=int(input())
for i in range(n):
	rest=list(input().split())
a=rest
rest.sort()
for i in range(n):
	print(rest.index(a[i])
Problem p03059 (python)

Fixed submission:
a,b,t = map(int, input().split())
sum = t//a
print(b*sum)

Buggy submission (verdict: Runtime Error):
a,b,t = map(int, input().split())
sum = a//t
print(b*ans)
Problem p03060 (python)

Fixed submission:
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
ans=[]
sum_v=0
sum_c=0
for i in range(n):
	if v[i]-c[i]>=0:
		sum_v+=v[i]
		sum_c+=c[i]
		ans.append(sum_v-sum_c)
try:
	print(max(ans))
except ValueError:
	print("0")

Buggy submission (verdict: Runtime Error):
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
ans=[]
for i in range(2**n):
	sum_v=0
	sum_c=0
	for j in range(n):
		if (i>>j)&1:
			sum_v+=v[j]
			sum_c+=c[j]
			ans.append[sum_v-sum_c]
print(max(ans))

Buggy submission (verdict: Runtime Error):
n=int(input())
v=[int(i) for i in range(n)]
c=[int(i) for i in range(n)]
ans=[]
for i in range(2**n):
	for j in range(n):
		if (i>>j)&1:
			sum_v+=v[j]
			sum_c+=c[j]
			ans.append(sum_c-sum_v)
print(max(ans))
Problem p03071 (python)

Fixed submission:
a,b = map(int, input().split())
sum=0
for i in range(2):
	if a>b:
		sum+=a
		a-=1
	else:
		sum+=b
		b-=1
print(sum)

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
sum=0
for i in range(2):
	if a>b:
		sum+=a
		a--
	else:
		sum+=b
		b--
print(sum)

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
sum=0
for i in range(2)
	if a>b:
		sum+=a
		a--
	else:
		sum+=b
		b--
print(sum)
Problem p03085 (python)

Fixed submission:
enki_dict={"A":"T","C":"G","T":"A","G":"C"}
b = input()
ans = enki_dict[b]
print(ans)

Buggy submission (verdict: Runtime Error):
enki_dict={"A":"T","C":"G"}
b = input()
ans = enki_dict[b]
print(ans)

Buggy submission (verdict: Runtime Error):
enki_dict={"A":"T","C":"G"}
b = input()
ans = enki_dict["b"]
print(ans)
Problem p03105 (python)

Fixed submission:
A,B,C = map(int, input().split())
s = B//A
if C<=s:
	print(C)
else:
	print(s)

Buggy submission (verdict: Runtime Error):
A,B,C = map(int, input().split())
s = B//A
if C<=s:
	print(C)
else
	print(s)
Problem p03106 (python)

Fixed submission:
a,b,k=map(int,input().split())
l=[]

for i in range(1,(min(a,b))+1):
	if a%i==0 and b%i==0:
		l.append(i)
l.sort(reverse=True)
if a==1 or b==1:
    l=[1,1]
print(l[k-1])

Buggy submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
l=[]
if k==1 or a==1 or b==1:
	print("1")
else:
	for i in range(1,(min(a,b))+1):
		if a%i==0 and b%i==0:
			l.append(i)
l.sort(reverse=True)
print(l[k-1])

Buggy submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
l=[]
if k==1 or a==1 or b==1:
	print("1")
else:
	for i in range(1,min(a,b)):
		if a%i==0 and b%i==0:
			l.append(i)
	
	print(l[k-1])

Buggy submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
l=[]
if k==1 or a==1 or b==1:
	print("1")
	break
else:
	for i in range(1,min(a,b)):
		if a%i==0 and b%i==0:
			l.append(i)
	
	print(l[k-1])

Buggy submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
l=[]
if k==1:
	print("1")
	break
for i in range(1,min(a,b)):
	if a%i==0 and b%i==0:
		l.append(i)

print(l[k-1])

Buggy submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
l=[]
for i in range(1,max(a,b)):
	if a%i==0 and b%i==0:
		l.append(i)
print(l[k-1])
Problem p03109 (python)

Fixed submission:
y,m,d = map(int, input().split("/"))
if y > 2018 and m > 4 :
    print("TBD")
else:
    print("Heisei")

Buggy submission (verdict: Runtime Error):
y,m,d = map(int, input()split(/))
if y > 2018:
    if m > 4:
        print("TBD")
else:
    print("Heisei")

Buggy submission (verdict: Runtime Error):
import datetime

S = input()
ans = "TBD"
datetime.datetime.strptime(S, '%Y/%M/%d')
tbd=datetime(2019/4/30)
if S <= tbd:
    ans="Heisei"
print("ans")
Problem p03220 (python)

Fixed submission:
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
ans=[]
for i in range(n):
	ans.append(abs(t-h[i]*0.006-a))
print(ans.index(min(ans))+1)

Buggy submission (verdict: Runtime Error):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
ans=[]
for i in range(n):
	ans.append(abs(abs(a)-abs(t−h[i]×0.006)))
print(ans.index(min(ans)+1)

Buggy submission (verdict: Runtime Error):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
ans=[]
for i in range(n):
	ans.append(a-abs(t−h[i]×0.006))
print(min(ans))
Problem p03238 (python)

Fixed submission:
n = int(input())
if n == 1:
    print("Hello World")
else:
    a = int(input())
    b = int(input())
    print(a+b)

Buggy submission (verdict: Runtime Error):
n = int(input())
if n in 1:
    print("Hello World")
else:
    a = int(input())
    b = int(input())
    print(a+b)
Problem p03239 (python)

Fixed submission:
n,t=map(int,input().split())
l=[]
ans="TLE"
for i in range(n):
	c,time=map(int,input().split())
	if time<=t:
		l.append(c)
		ans=str(min(l))
print(ans)

Buggy submission (verdict: Runtime Error):
n,t=map(int,input().split())
l=[]
for i in range(n):
	c,time=map(int,input().split())
	if time<=t:
		l.append(c)
print(min(l))
Problem p03264 (python)

Fixed submission:
k = int(input())
ans = (k//2) * ((k+1)//2)
print(ans)

Buggy submission (verdict: Runtime Error):
108proA
k = int(input())
ans = (k//2) * ((k+1)//2)
print(ans)
Problem p03369 (python)

Fixed submission:
s = input()
cnt = 0
for i in s:
    if i == "o":
        cnt+=100
print(700+cnt)

Buggy submission (verdict: Runtime Error):
s = input()
cnt = 0
for i in s:
    if i == o:
        cnt+=100
print(700+cnt)
Problem p03543 (python)

Fixed submission:
n = input()
n_list = []
for i in n:
    n_list.append(i)
if n_list[1]==n_list[2]==n_list[0]:
    print("Yes")
elif n_list[2]==n_list[3]==n_list[1]:
    print("Yes")
elif n_list[0]==n_list[1]==n_list[2]==n_list[3]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
n_list = []
for i in n:
    n_list.append(i)
print(n_list)
if n_list[1]==n_list[2]==n_list[0]:
    print("Yes")
elif n_list[2]==n_list[3]==n_list[1]:
    print("Yes")
elif n_list[0]==n_list[1]==n_list[2]==n_list[3]:
    print("Yes")
else:
    print("No")
Problem p03693 (python)

Fixed submission:
r = list(map(str,input().split()))
s = "".join(r)
if int(s)%4==0:
	print("YES")
else:
	print("NO")

Buggy submission (verdict: Runtime Error):
r = list(map(str,input().split()))
s = "".join(r)
if s%4==0:
	print("YES")
else:
	print("NO")

Buggy submission (verdict: Runtime Error):
r = list(map(int,input().split()))
s = "".join(r)
if s%4==0:
	print("Yes")
else:
	print("No")
Problem p03737 (python)

Fixed submission:
a,b,c = input().split()
a_d=a.capitalize()
b_d=b.capitalize()
c_d=c.capitalize()
print(a_d[0]+b_d[0]+c_d[0])

Buggy submission (verdict: Runtime Error):
a,b,c = input().split()
str.capitalize(a,b,c)
print(a[0]+b[0]+c[0])
Problem p03777 (python)

Fixed submission:
a,b = input().split()
if a == b:
	print("H")
else:
	print("D")

Buggy submission (verdict: Runtime Error):
a,b = input().split()
if a == b:
	print("H"):
else:
	print("D")
Problem p03861 (python)

Fixed submission:
a,b,x=map(int,input().split())
ans_a=(a-1)//x
ans_b=b//x
print(ans_b-ans_a)

Buggy submission (verdict: Runtime Error):
a,b,x=map(int,input().split())
cnt=0
while b-a<k:
	b-=k
	cnt+=1
print(cnt)
Problem p02657 (python)

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

input_list = input().split(" ")
print(int(input_list[0]) * int(input_list[1]))

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

N = int(input())

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

mul = A[0]
for i in A[1:]:
    mul *= i
    
    if mul > 1000000000000000000:
        print(-1)
        exit(-1)

print(mul)
Problem p02658 (python)

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

import numpy as np

N = int(input())

A = np.array(list(map(int, input().split())))

if 0 in A:
    print(0)
    exit(0)

mul = A[0]

if np.sum(A < 0) % 2 == 1:
    for i in A[1:]:
        mul *= i
else:
    for i in A[1:]:
        if 1000000000000000000 / i < mul:
            print(-1)
            exit(0)
        mul *= i

if mul > 1000000000000000000:
    print(-1)
    exit(0)

print(mul)

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

import numpy as np

N = int(input())

A = np.array(list(map(int, input().split())))

if 0 in A:
    print(0)
    exit(1)

if np.sum(A > 0) % 2 == 1:
    print(np.prod(A))
    exit(1)

mul = A[0]
for i in A[1:]:
    if 1000000000000000000 / i < mul:
        print(-1)
        exit(1)
    mul *= i

if mul > 1000000000000000000:
    print(-1)
    exit(1)

print(mul)

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

import numpy as np

N = int(input())

A = np.array(list(map(int, input().split())))

if 0 in A:
    print(0)
    exit(-1)

if np.sum(A > 0) % 2 == 1:
    print(np.prod(A))
    exit(-1)

mul = A[0]
for i in A[1:]:
    if 1000000000000000000 / i < mul:
        print(-1)
        exit(-1)
    mul *= i

if mul > 1000000000000000000:
    print(-1)
    exit(-1)
print(mul)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
 
import numpy as np
 
N = int(input())
 
A = np.array(list(map(int, input().split())))
mul = np.prod(A)
 
if mul > 1000000000000000000:
    print(-1)
    exit(-1)
print(mul)

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

import numpy as np

N = int(input())

A = np.arrya(list(map(int, input().split())))
mul = np.prod(A)

if mul > 1000000000000000000:
    print(-1)
    exit(-1)
print(mul)

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

N = int(input())

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

if 0 in A:
    print(0)
    exit(-1)

mul = A[0]
for i in A[1:]:
    mul *= i
    
    if mul > 1000000000000000000:
        print(-1)
        exit(-1)

if mul > 1000000000000000000:
    print(-1)
    exit(-1)
print(mul)

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

N = int(input())

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

if 0 in A:
    print(0)
    exit(-1)

mul = A[0]
for i in A[1:]:
    mul *= i
    
    if mul > 1000000000000000000:
        print(-1)
        exit(-1)

print(mul)

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

N = int(input())

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

mul = A[0]
for i in A[1:]:
    mul *= i
    
    if mul > 1000000000000000000:
        print(-1)
        exit(-1)

print(mul)
Problem p02663 (python)

Fixed submission:
from datetime import datetime,timedelta

a=input().split()
a=[int(_) for _ in a]

t1=datetime(2000,1,1,a[0],a[1],0)
t2=datetime(2000,1,1,a[2],a[3],0)

delta=t2-t1
total_seconds=delta.seconds

ans=(total_seconds-a[4]*60)/60
print(int(ans))

Buggy submission (verdict: Runtime Error):
from datetime import datetime,timedelta

a=[1,1,1,1,1]
a[0]=input()
a[1]=input()
a[2]=input()
a[3]=input()
a[4]=input()
a=[int(x) for x in a] 
t1=datetime(2000,1,1,a[0],a[1],0)
t2=datetime(2000,1,1,a[2],a[3],0)

delta=t2-t1
total_seconds=delta.seconds

ans=(total_seconds-a[4]*60)/60
print(int(ans))

Buggy submission (verdict: Runtime Error):
from datetime import datetime,timedelta

a=[int(input()) for _ in range(5)]

t1=datetime(2000,1,1,a[0],a[1],0)
t2=datetime(2000,1,1,a[2],a[3],0)

delta=t2-t1
total_seconds=delta.seconds

ans=(total_seconds-a[4]*60)/60
print(int(ans))

Buggy submission (verdict: Runtime Error):
from datetime import datetime,timedelta

a=[int(input()) for _ in range(5)]

t1=datetime(2000,1,1,a[0],a[1],0)
t2=datetime(2000,1,1,a[2],a[3],0)

delta=t2-t1
total_seconds=delta.seconds

ans=(total_seconds-a[4]*60)/60
print(ans)

Buggy submission (verdict: Runtime Error):
from datetime import datetime,timedelta

a=[int(input()) for _ in range(4)]

t1=datetime(2000,1,1,a[0],a[1],0)
t2=datetime(2000,1,1,a[2],a[3],0)

delta=t2-t1
total_seconds=delta.seconds

ans=(total_seconds-a[4]*60)/60
print(ans)
Problem p02789 (python)

Fixed submission:
x = input().split()
if x[0] == x[1]:
    print("Yes")
else :
    print("No")

Buggy submission (verdict: Runtime Error):
x = input().split()
n = 0
for i in range(1,int(x[0])+1):
    l = 0
    for j in range(1,i+1):
               if x[i] <= x[j]:
                    l += 1
    if l == i:
        n += 1
print(n)
Problem p02791 (python)

Fixed submission:
n = int(input())
m = list(map(int, input().split()))
l = 0
s = m[0]
for i in range(0,n):
    if s >= m[i]:
        s = m[i]
        l += 1
print(l)

Buggy submission (verdict: Runtime Error):
x = input().split()
n = int(x[0])
m = x[1:len(x)]
k = 0
for i in range(0,n):
    a = int(m[i])
    for j in range(0,i):
        if int(m[i]) > int(m[j]):
            a = int(m[j])
    if a == int(m[i]):
        k += 1
print(k)

Buggy submission (verdict: Runtime Error):
x = input().split()
n = 0
for i in range(1,int(x[0])+1):
    l = 0
    for j in range(1,i+1):
               if int(x[i]) <= int(x[j]):
                    l += 1
    if l == i:
        n += 1
print(n)

Buggy submission (verdict: Runtime Error):
x = input().split()
n = 0
for i in range(1,int(x[0])+1):
    l = 0
    for j in range(1,i+1):
               if x[i] <= x[j]:
                l += 1
    if l == i:
        n += 1
print(n)
Problem p02691 (python)

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

Buggy submission (verdict: Runtime Error):
from itertools import combinations

n = int(input())
a = list(map(int,input().split()))
b = list(range(1,n+1))
c = [0]*int(n*(n-1)/2)
d = [0]*int(n*(n-1)/2)
for i,j in enumerate(combinations(b,r=2)):
  x,y = map(int,j)
  c[i] = abs(x-y)
cnt = 0

for i,j in enumerate(combinations(a,r=2)):
  x,y = map(int,j)
  difh = x + y
  d[i] = x + y
  if difh == c[i]:
    cnt += 1
# print(c)
# print(d)
print(cnt)
Problem p02696 (python)

Fixed submission:
a,b,n = map(int,input().split())
i = min(b-1,n)
ans = a*i//b - a*(i//b)
print(ans)

Buggy submission (verdict: Runtime Error):


a,b,n = map(int,input().split())
ans = 0

for i in range(n+1,n-a,-1):
    ans = max(ans,(a*i)//b) - a*(i//b))

print(ans)
Problem p02743 (python)

Fixed submission:

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

if 4*a*b - (c - a - b) ** 2 < 0 and c - a - b > 0:
  print("Yes")
  
else:
  print("No")

Buggy submission (verdict: Runtime Error):

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

if c - a - b < 0:
  print("No")
elif Decimal(c**0.5 - a**0.5 - b**0.5) > 0
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
import math
from decimal import Decimal, getcontext
getcontext().prec = 0
a,b,c = map(int,input().split())

if c - a - b < 0:
  print("No")
elif Decimal(c**0.5 - a**0.5 - b**0.5) < 0:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
import math
from decimal import Decimal, getcontext
getcontext().prec = 0
a,b,c = map(int,input().split())

if Decimal(c**0.5 - a**0.5 - b**0.5) < 0:
  print("No")
else:
  print("Yes")
Problem p02802 (python)

Fixed submission:
n, m = map(int, input().split())
ac = 0
wa = 0
cnt = [0]*n

for i in range(m):
    p, s = input().split()
    p = int(p)
    p -= 1
    if cnt[p] == -1:
        continue
    elif s == 'AC':
        ac += 1
        wa += cnt[p]
        cnt[p] = -1
    else:
        cnt[p] += 1
print(ac, wa)

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
ps = [input().split() for _ in range(m)]


answer =["inf"]*m
count = 0

for i in range(len(ps)):
  if ps[i][0] not in answer:
    if ps[i][1] == "AC":
      answer[i] = ps[i][0]
    else:
      count += 1
answer.remove("inf")
print(len(answer),count)
Problem p02813 (python)

Fixed submission:
import itertools
 
n = int(input())
p = tuple(map(int,input().split()))
q = tuple(map(int,input().split()))

l = list(range(1,n+1))
dic = {}

for i,j in enumerate(itertools.permutations(l)):
    dic[j] = i+1
print(abs(dic[p]-dic[q]))

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

l = list(range(1,n+1))
dic = {}

for i,j in enumerate(itertools.permutations(l)):
    dic[j] = i+1
print(abs(dic[p]-dic[q]))
Problem p02909 (python)

Fixed submission:
s = input()

if s == "Sunny":
  print("Cloudy")
elif s == "Cloudy":
  print("Rainy")
elif s == "Rainy":
  print("Sunny")

Buggy submission (verdict: Runtime Error):
import heapq

n, m = map(int,input().split())
A = list(map(lambda x: int(x)*(-1), input().split()))

heapq.heapify(A)

for i in range(m):
    a = heap.heappop(A)
    heapq.heappush(A,-1* (-a//2))
print(-sum(a))
Problem p03564 (python)

Fixed submission:
n = int(input())
k = int(input())
s = 1
for i in range(n):
    if 2 * s < s + k:
        s += s
    else:
        s += k
print(s)

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


for i in range(n):
    if 2 * s < s + k:
        s += s
    else:
        s += k
print(s)
Problem p02675 (python)

Fixed submission:
a = int(input())

if a%10==3:
  print("bon")
elif a%10 in [0,1,6,8]:
  print("pon")
else:
  print("hon")

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

if a%10==3:
  print("bon")
elif a%10 in [0,1,6,8]:
  print("pon")
else:
  print("hon")
Problem p02817 (python)

Fixed submission:
s, t = map(str, input().split())
ans = t + s
print(ans)

Buggy submission (verdict: Runtime Error):
s, t map(str, input().split())
ans = t + s
print(ans)
Problem p02981 (python)

Fixed submission:
N,A,B = map(int,input().split())
kake = N*A

print(min(kake,B))

Buggy submission (verdict: Runtime Error):
N,A,B = map(int,input().split)
kake = N*A

print(min(kake,B))
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
x, y = int(input("Number")), int(input("Number"))
print(x*y)

Buggy submission (verdict: Runtime Error):
x, y = input("Number")
print(x*y)
Problem p02971 (python)

Fixed submission:
def main():
    n = int(input())
    a_list = []
    for i in range(n):
        a = int(input())
        #[タグ、値]
        a_list.append([i,a])

    ans = sorted(a_list, key=lambda x:x[1])
    #print(ans)

    #print("-"*75)
    for i in range(n):
        #if 値 == max(ans)
        if a_list[i][1] == ans[-1][1]:
            #ansの最後から二番目の値
            print(ans[-2][1])
        else:
            print(ans[-1][1])

main()

Buggy submission (verdict: Runtime Error):
def main():
    n = int(input())
    a_list = []
    for _ in range(n):
        a = int(input())
        a_list.append(a)

    for i in a_list:
        if i == max(a_list):
            a_list.sort()
            print(a_list[-2])
        else:
            print(max(a))

main()

Buggy submission (verdict: Runtime Error):
def main():
    n = int(input())
    a_list = []
    for _ in range(n):
        a = int(input())
        a_list.append(a)

    for i in a_list:
        if i == max(a_list):
            a_list.sort()
            print(a_list[-2])
        else:
            print(max(a))

main()