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

Fixed submission:
# 初期入力
from collections import Counter
import sys
input = sys.stdin.readline  #文字列では使わない
n = int(input())
v = list(map(int, input().split()))
vo1 =v[1::2]
ve2 =v[0::2]
co1_k,co1_v = zip(*Counter(vo1).most_common())
ce2_k,ce2_v = zip(*Counter(ve2).most_common())

ans =0

if vo1 ==ve2:
    if len(ce2_k) <=2:
        ans =sum(ce2_v)
    else:
        ans =sum(ce2_v) +sum(co1_v[2:])   
elif len(co1_v) ==len(ce2_v) ==1:
    ans =0
elif co1_k[0] ==ce2_k[0]:
    if len(co1_v) ==1:
        ans =sum(ce2_v[1:])
    elif len(ce2_v) ==1:
        ans =sum(co1_v[1:])
    elif len(co1_v) ==len(ce2_v) ==2:
        ans1 =co1_v[1] +ce2_v[0]
        ans2 =co1_v[0] +ce2_v[1]
        ans =min(ans1,ans2)
    elif len(co1_v) ==2:
        ans1 =co1_v[1] +ce2_v[0] +sum(ce2_v[2:])
        ans2 =co1_v[0] +sum(ce2_v[1:])
        ans =min(ans1,ans2)
    elif len(ce2_v) ==2:
        ans1 =ce2_v[1] +co1_v[0] +sum(co1_v[2:])
        ans2 =ce2_v[0] +sum(co1_v[1:])
        ans =min(ans1,ans2)
    else:
        ans1 =sum(co1_v[1:]) +ce2_v[0] +sum(ce2_v[2:] )
        ans2 =sum(ce2_v[1:]) +co1_v[0] +sum(co1_v[2:] )
        ans =min(ans1,ans2)
else: 
    if len(co1_v) ==1:
        ans =sum(ce2_v[1:])
    elif len(ce2_v) ==1:
        ans =sum(co1_v[1:])
    else:
        ans =sum(co1_v[1:]) +sum(ce2_v[1:])  
   
print(ans)

Buggy submission (verdict: Runtime Error):
# 初期入力
from collections import Counter
import sys
input = sys.stdin.readline  #文字列では使わない
n = int(input())
v = list(map(int, input().split()))
vo1 =v[1::2]
ve2 =v[0::2]
co1_k,co1_v = zip(*Counter(vo1).most_common())
ce2_k,ce2_v = zip(*Counter(ve2).most_common())
"""
co1_l =list(co1.values())
ce2_l =list(ce2.values())
co1_l.sort(reverse=True)
ce2_l.sort(reverse=True)
"""
ans =0

if vo1 ==ve2:
    ans =len(vo1)
elif len(co1_v) ==len(ce2_v) ==1:
    ans =0
elif co1_k[0] ==ce2_k[0]:
    if len(co1_v) ==1:
        ans =sum(ce2_v[1:])
    elif len(ce2_v) ==1:
        ans =sum(co1_v[1:])
    elif len(co1_v) ==len(ce2_v) ==2:
        ans1 =co1_v[1] +ce2_v[0]
        ans2 =co1_v[0] +ce2_v[1]
        ans =min(ans1,ans2)
    elif len(co1_v) ==2:
        ans1 =co1_v[1] +ce2_v[0] +sum(ce2_v[2:])
        ans2 =co1_v[0] +sum(ce2_v[1:])
        ans =min(ans1,ans2)
    elif len(ce2_v) ==2:
        ans1 =ce2_v[1] +co1_v[0] +sum(co1_v[2:])
        ans2 =ce2_v[0] +sum(co1_v[1:])
        ans =min(ans1,ans2)
    else:
        ans1 =sum(co1_v[1:]) +ce2_v[0] +sum(ce2_v[2:] )
        ans1 =sum(ce2_v[1:]) +co1_v[0] +sum(co1_v[2:] )
        ans =min(ans1,ans2)
else: 
    if len(co1_v) ==1:
        ans =sum(ce2_v[1:])
    elif len(ce2_v) ==1:
        ans =sum(co1_v[1:])
    else:
        ans =sum(co1_v[1:]) +sum(ce2_v[1:])  
   
print(ans)
Problem p03262 (python)

Fixed submission:
# 最大公約数(mathは3.5以降) 
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

# 初期入力
import sys
#input = sys.stdin.readline  #文字列では使わない
N,X = map(int, input().split())
x = list(map(int, input().split()))

# ｘの隣同士の距離リスト
x_div =[abs(X-x[0])] #初項
for i in range(N-1):
    x_div.append(abs(x[i] -x[i+1]))

#x_divの最大公約数
if N ==1:
    ans =abs(x[0] -X)
else:
    ans =gcd_list(x_div)
print(ans)

Buggy submission (verdict: Runtime Error):
# 最大公約数(mathは3.5以降) 
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

# 初期入力
import sys
#input = sys.stdin.readline  #文字列では使わない
N,X = map(int, input().split())
x = list(map(int, input().split()))

# ｘの隣同士の距離リスト
x_div =[abs(X-x[0])] #初項
for i in range(N):
    x_div.append(abs(x[i] -x[i+1]))

#x_divの最大公約数
if N ==1:
    ans =abs(x[0] -X)
else:
    ans =gcd_list(x_div)
print(ans)
Problem p02600 (python)

Fixed submission:
import math
X = int(input())
print(str(10-math.floor(X/200)))

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
ans = 0
A = sorted(A, reverse = True)
for i in range(N-1):
  print(A[i])
  ans += A[i]
print(ans)
Problem p03573 (python)

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

if a==b:
    ans=c
elif b==c:
    ans=a
else:
    ans=b
print(ans)

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

if a==b:
    ans=c
elif b==c:
    ans=a:
else:
    ans=b
print(a+b+c-ans)
Problem p02791 (python)

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

c=1
t=P[0]
for i in range(len(P)-1):
    if t>P[i+1]:
        c+=1
        t=P[i+1]

print(c)

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

i=0
while 1:
    j=i+1
    while 1:
        if P[i]<P[j] :
            P.remove(P[j])
        if j>=len(P)-1:
            break
        j+=1
    if i>=len(P)-2:
        break
    i+=1

print(len(P))
Problem p02994 (python)

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

D=[]
for i in range(n):
    d = l+i
    D.append(d)

if l+1>0 :
    mind = min(D)
elif l+n<=0:
    mind = max(D)
else:
    mind = 0


ans = sum(D)-mind
print(ans)

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

D=[]
for i in range(n):
    d = l+i
    D.append(d)

if l>-1 :
    mind = D[0]
elif l+n<0:
    mind = D[n-1]
else:
    mind = 0


ans = sum(D)-mind
print(ans
Problem p03087 (python)

Fixed submission:
n,q = map(int,input().split())
s=input()
LR=[]
for i in range(q):
    l,r = map(int,input().split())
    LR.append([l,r])

c=0
p=0
C=[]
for i in range(len(s)):
    if s[i]=="A":
        p=1
    elif p==1 and s[i]=="C":
        c+=1
        p=0
    else:
        p=0
    C.append(c)

for i in range(q):
    l=LR[i][0]
    r=LR[i][1]
    ans = C[r-1]-C[l-1]
    print(ans)

Buggy submission (verdict: Runtime Error):
n,q = map(int,input().split())
s=input()
LR=[]
for i in range(q):
    l,r = map(int,input().split())
    LR.append([l,r])

c=0
C=[]
for i in range(n):
    if s[i]=="A":
        p=1
    elif p==1 and s[i]=="C":
        c+=1
        p=0
    else:
        p=0
    C.append(c)

for i in range(q):
    l=LR[i][0]
    r=LR[i][1]
    ans = C[r-1]-C[l-1]
    print(ans)
Problem p02573 (python)

Fixed submission:
# Union Find

# xの根を求める
def find(x):
    if par[x] < 0:
        return x
    else:
        tank = []
        while par[x] >= 0:
            tank.append(x)
            x = par[x]
        for elt in tank:
            par[elt] = x
        return x


# xとyの属する集合の併合
def unite(x, y):
    x = find(x)
    y = find(y)

    if x == y:
        return False
    else:
        # sizeの大きいほうがx
        if par[x] > par[y]:
            x, y = y, x
        par[x] += par[y]
        par[y] = x
        return True


# xとyが同じ集合に属するかの判定
def same(x, y):
    return find(x) == find(y)


# xが属する集合の個数
def size(x):
    return -par[find(x)]


# 初期化
# 根なら-size,子なら親の頂点
n,m = map(int,input().split())
par = [-1] * n
ans = 0
for i in range(m):
    X,Y = map(int,input().split())
    unite(X-1,Y-1)

for i in range(n):
    ans = max(size(i),ans)
print(ans)

Buggy submission (verdict: Runtime Error):
n,m=input().split()
ab = [map(int, input().split()) for _ in range(m)]
a, b = [list(i) for i in zip(*xy)]
friendnum = [0]*n
for i in range(n):
    for k in range(m):
        if a[k] == i:
            friendnum[i].append(b[i])
        if b[k] == i:
            friendnum[i].append(a[i])
ans = max(ans,len(frindnum[i]))
print(ans)
Problem p02747 (python)

Fixed submission:
s=input()
flag=True
for i in range(0,len(s),2):
  if "hi"==s[i:i+2]:
    continue
  else:
    flag=False
    break
if flag==True:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
s=input()
flag=True
for i in range(0,len(s),2):
  if "hi"=ar[i:i+2]:
    continue
  else:
    flag=False
    break
if flag==True:
  print("Yes")
else:
  print("No")
Problem p02772 (python)

Fixed submission:
n = int(input()) 
  
# input the array 
# arr = []
arr = list(map(int, input().split()))
den=0
app=0
for i in arr:
    i=int(i)
    if (i%2==0):
        if i%3==0 or i%5==0:
            app+=1
        else:
            den+=1
            break

if den>0:
  print("DENIED")
else:
  print("APPROVED")

Buggy submission (verdict: Runtime Error):
n=int(input())
arr=input.split()
den=0
app=0
for i in arr:
  i=int(i)
  if (i%2):
    if i%3==0 or i%5==0:
      app+=1
    else:
      den+=1
if den>0:
  print("DENIED")
else:
  print("APPROVED")
Problem p02778 (python)

Fixed submission:
g=str(input())
print("x"*len(g))

Buggy submission (verdict: Runtime Error):
g=str(input())
print("x"*len(s))
Problem p02784 (python)

Fixed submission:
h,n=map(int,input().split())
arr=list(map(int,input().split()))
if h<=sum(arr):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
h,n=map(int,input().split())
arr=list(map(int,input().split()))
if h<=sum(arr):
  print("Yes")
else:
  print("No")
Problem p02786 (python)

Fixed submission:
def hel(h):
  if h==1:
    return 1
  else:
    return (2*hel(int(h/2))+1)
health=int(input())
print(hel(health))

Buggy submission (verdict: Runtime Error):
def hel(h):
  if h==0:
    return 1
  else:
    return (hel(int(h/2))+hel(int(h/2))
health=int(input())
print(hel(health))
Problem p02553 (python)

Fixed submission:
a, b, c, d = map(int, input().split())
res = []
res.append(a*c)
res.append(a*d)
res.append(b*c)
res.append(b*d)
print(max(res))

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


for x in (a, b):
    for y in (c, d):
        ans = max(ans, x * y)

print(ans)
Problem p02602 (python)

Fixed submission:
N, K =map(int, input().split())
A = list(map(int, input().split()))
for i in range(N-K):
    if A[K+i] > A[i]:
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
N, K =map(int, input().split())
A = list(map(int, input().split()))
for i in range(N-K):
  if A[K+i] ＞ A[i]:
    print('Yes')
  else:
    print('No')

Buggy submission (verdict: Runtime Error):
N, K =map(int, input().split())
A = list(map(int, input().split()))
for i in range(0, N-K):
  if A[K+i] ＞ A[i]:
    print('Yes')
  else:
    print('No')

Buggy submission (verdict: Runtime Error):
N, K =map(int, input().split())
A = list(map(int, input().split()))
for i in range(0, K-N):
  if A[K+i] ＞ A[i]:
    print('Yes')
  else:
    print('No')

Buggy submission (verdict: Runtime Error):
N, K =map(int, input().split())
A = list(map(int, input().split()))
for i in range(K, N):
  if A[K+i] ＞ A[i]:
    print('Yes')
  else:
    print('No')

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
A = list(map(int, input().split()))
for i in range(K, N):
    if A[i-2]*A[i-1]*A[i-3] > A[i-4]*A[i-3]*A[i-2]:
        print('Yes')
    else:
        print('No')
Problem p02607 (python)

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
cnt = 0
for i in range(0, N):
    if (i+1) % 2 != 0 and a[i] % 2 != 0:
        cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int, input().split()))
cnt = 0
for i in range(0, N+1, 2):
    if a[i] % 2 != 0:
        cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
 = int(input())
a = list(map(int, input().split()))
cnt = 0
for i in range(0, N):
    if (i+1) % 2 != 0 and a[i] % 2 != 0:
        cnt += 1
print(cnt)
Problem p02608 (python)

Fixed submission:
N = int(input())
lis = [0]*N
for x in range(1, 100):
    for y in range(1, 100):
        for z in range(1, 100):
            ans = x**2 + y**2 + z**2 + x*y + y*z + z*x -1
            if ans >= N:
                pass
            else:
                lis[ans] += 1
for i in range(N):
    print(lis[i])

Buggy submission (verdict: Runtime Error):
N = int(input())
lis = [0]*N
for x in range(1, 100):
    for y in range(1, 100):
        for z in range(1, 100):
            ans = x**2 + y**2 + z**2 + x*y + y*z + z*x -1
            if ans > N:
                pass
            else:
                lis[ans] += 1
for i in range(N):
    print(lis[i])
Problem p02612 (python)

Fixed submission:
N = int(input())
if N >= 1000:
    M = str(N)
    X = M[1:]
    O = int(X)
    if O == 0:
        print(0)
    else:
        print(1000-O)
else:
    O = int(N)
    print(1000-O)

Buggy submission (verdict: Runtime Error):
N = input()
M = N[1:]
O = int(M)
if O == 0:
    print(0)
else:
    print(1000-O)
Problem p02640 (python)

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

if Y > (4*X):
    print('No')

elif Y < (2*X):
    print('No')

elif Y % 2 != 0:
    print('No')

else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
X, Y = map(int, input().split())
if 2*X < Y < 4*X:
    elif Y % 2 != 0:
        print('No')
    else:
        print('Yes')

else:
    print('No')
Problem p02641 (python)

Fixed submission:
X, N = map(int, input().split())
p = list(map(int, input().split()))

if N == 0:
    print(X)

elif X not in p:
    print(X)
    
else:
    for i in range(110):
        if (X-(i+1)) in p and (X+i+1) in p:
            continue
    
        else:
            if(X-(i+1)) not in p:
                print(X-(i+1))
                break
    
            elif (X+i+1) not in p:
                print(X+i+1)
                break

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

if N == 0:
    print(X)
    break
    
else:
    for i in range(100):
    if (X-(i+1)) and (X+i+1) in p:
        continue
    
    elif (X-i-1) not in p:
        print(X-i-1)
        break
    
    elif (X+i+1) not in p:
        print(X+i+1)
        break
Problem p02642 (python)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
 
M = 10**6 + 1
 
cnt = [0] * M
 
for a in A:
    if cnt[a] != 0:
        cnt[a] += 1
        continue
    for b in range(a, M, a):
        cnt[b] += 1
 
ans = 0
for a in A:
    if cnt[a] == 1:ans += 1
 
print(ans)

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

for i in range(N):
    for j in range(N):
        if j == i:
            continue
        elif (A[i] % A[j]) = 0:
            continue
        else:
            count += 1
            break

print(count)
Problem p02690 (python)

Fixed submission:
x=int(input())
for a in range(-200,200,1):
    for b in range(-200,200,1):
        if a**5 - b**5 == x:
            print(a,b)
            exit()

Buggy submission (verdict: Runtime Error):
X = int(input())
cnt=0
for a in range(-1000, 1001):
	for b in range(-1000, 1001):
		if a**5 - b**5 == X:
        	print('a'+' b')
            exit()
Problem p02756 (python)

Fixed submission:
from collections import deque
S = input()
Q = int(input())
R = deque(S)
rev = 0

for i in range(Q):
    T = input().split()
    if T[0] == '1':
        rev += 1
    else:
        if T[1] == '1':
            if rev % 2 == 0:
                R.appendleft(T[2])
            else:
                R.append(T[2])
        else:
            if rev % 2 == 0:
                R.append(T[2])
            else:
                R.appendleft(T[2])
ans = ''.join(R)
if rev % 2 ==0:
    print(ans)
else:
    print(ans[::-1])

Buggy submission (verdict: Runtime Error):
from collections import deque
S = input()
Q = int(input())
rev = 0

for i in range(Q):
    T = input().split()
    if T[0] == '1':
        rev += 1
    else:
        if T[1] == '1':
            if rev % 2 == 0:
                S.insert(0, T[2])
            else:
                S.append(T[2])
        else:
            if rev % 2 == 0:
                S.append(T[2])
            else:
                S.insert(0,T[2])
ans = ''.join(S)
if rev % 2 ==0:
    print(ans)
else:
    print(ans[::-1])

Buggy submission (verdict: Runtime Error):
from collections import deque
S = input()
Q = int(input())
rev = 0

for i in range(Q):
    T = input().split()
    if T[0] == '1':
        rev += 1
    else:
        if T[1] == '1':
            if rev % 2 == 0:
                S.appendleft(T[2])
            else:
                S.append(T[2])
        else:
            if rev % 2 == 0:
                S.append(T[2])
            else:
                S.appendleft(T[2])
ans = ''.join(S)
if rev % 2 ==0:
    print(ans)
else:
    print(ans[::-1])
Problem p02555 (python)

Fixed submission:
def main():
    S = int(input())
    dp = [0]*(S+1)
    dp[0] = 1
    dp[1] = 0
    if S >= 2:
        dp[2] = 0
    for i in range(3,S+1,1):
        for j in range(0,i-2,1):
            dp[i] += dp[j]

    return dp[S]%1000000007

print(main())

Buggy submission (verdict: Runtime Error):
def main():
    S = int(input())
    dp = [0]*(S+1)
    dp[0] = 1
    dp[1] = 0
    dp[2] = 0
    for i in range(3,S+1,1):
        for j in range(0,i-2,1):
            dp[i] += dp[j]

    return dp[S]%1000000007

print(main())
Problem p02615 (python)

Fixed submission:
def main():
    N = int(input())
    A = list(map(int,input().split()))
    A.sort(reverse = True)
    ans = A[0]
    kazu = (N-2)//2
    amari = (N-2)%2
    for i in range(1,kazu+1,1):
        #print(i)
        ans += (A[i]*2)

    if amari==1:
        ans += A[i+1]*amari

    print(ans)

main()

Buggy submission (verdict: Runtime Error):
def main():
    N = int(input())
    A = list(map(int,input().split()))
    A.sort(reverse = True)
    ans = A[0]
    kazu = (N-2)//2
    amari = (N-2)%2
    for i in range(1,kazu+1,1):
        #print(i)
        ans += (A[i]*2)

    ans += A[i+1]*amari

    print(ans)

main()
Problem p02642 (python)

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

    A.sort()
    dict = {}
    for i in range(1,A[N-1]+1):
        dict[i] = 0

    if N == 1:
        return 1

    if A[0] == 1 and A[1] != 1:
        return 1
    elif A[0] == 1 and A[1] == 1:
        return 0

    temp = 1

    for num in A:
        while True:
            if num*temp <= A[N-1]:
                dict[num*temp] += 1
                temp += 1
            else:
                temp = 1
                break

    ans = 0
    for num2 in A:
        if dict[num2] <= 1:
            ans += 1

    return ans


print(main())

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

    A.sort()
    ans = 0
    temp = 0
    for i in range(N):
        if i == 0 and A[i+1] != A[i]:
            ans += 1
            continue

        temp = A[i]

        if i == N-1 and temp == A[i-1]:
            continue
        elif i != N-1:
            if temp == A[i+1] or temp == A[i-1]:
                continue

        for j in range(N):
            if A[j] <= temp/2 and A[i]%A[j] == 0:
                break
            elif A[j] <= temp//2 and A[i]%A[j] != 0:
                continue
            elif A[j] > temp//2:
                ans += 1
                break
    return ans

print(main())
Problem p02658 (python)

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

multi = 1
a = 1

for i in range(n):
    if n_list[i]==0:
        a = 0
        break

for i in range(n):
    if a == 0:
        multi = 0
        break

    multi *= n_list[i]

    if multi>1e18:
        break

if multi<=1e18:
    print(multi)
else:
    print(-1)

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

multi = 1

for i in range(n):
    if n_list[i]==0:
        a = 0
        multi = 0
        break

for i in range(n):
    if a == 0:
        break

    multi *= n_list[i]

    if multi>1e18:
        break

print(multi)
if multi<=1e18:
    print(multi)
else:
    print(-1)
Problem p02687 (python)

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

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

Fixed submission:
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def main():
    K = int(input())
    ans = 0
    #全てが同じ数字
    for i in range(1,K+1,1):
        ans += gcd(i,i,i)
    #2つ同じ数字
    tmp = 0
    for i in range(1,K+1,1):
        for j in range(1,K+1,1):
            if j != i:
                tmp += gcd(i,i,j)
    ans += tmp*3
    #3つの異なる数字
    tmp2 = 0
    for i in range(1,K+1,1):
        for j in range(i+1,K+1,1):
            for h in range(j+1,K+1,1):
                tmp2 += gcd(i,j,h)

    ans += tmp2*6

    return ans

print(main())

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def main():
    K = int(input())
    ans = 0
    #全てが同じ数字
    for i in range(1,K+1,1):
        for j in range(1,K+1,1):
            for k in range(1,K+1,1):
                ans += gcd(i,j,k)

    return ans

print(ans)
Problem p02743 (python)

Fixed submission:
import math

def main():
    a,b,c = map(int,input().split())
    left = 4*a*b
    right = (c-a-b)**2
    if (c-a-b)<0:
        return 'No'

    if left < right:
        return 'Yes'
    else:
        return 'No'

print(main())

Buggy submission (verdict: Runtime Error):
import math
import sympy

def main():
    a,b,c = map(int,input().split())
    left = 4*a*b
    right = (c-a-b)**2
    if (c-a-b)<0:
        return 'No'

    if left < right:
        return 'Yes'
    else:
        return 'No'

print(main())
Problem p03076 (python)

Fixed submission:
A = [int(input()) for _ in range(5)]
ans = 0
temp2 = 10

for i in range(5):
    if A[i] % 10 == 0:
        ans += A[i]
    else:
        temp = (A[i]//10)*10 + 10
        ans += temp
        if temp2 > A[i] % 10:
            temp2 = A[i] % 10


temp2 = 10 - temp2
ans = ans - temp2
print(ans)

Buggy submission (verdict: Runtime Error):
A = [int(input()) for _ in range(5)]
ans = 0

for i in range(5):
    if A[i] % 10 == 0:
        ans += A[i]
    else:
        temp = (A//10)*10
        ans += temp

print(ans)
Problem p03150 (python)

Fixed submission:
def main():
    S = input()
    if S[0] != 'k':
        return ('NO')
    elif S == 'keyence':
        return ('YES')

    ans = 'keyence'
    i = 0
    j = 0
    while True:
        i += 1
        j += 1
        if S[i] != ans[j]:
            break

    #残りの文字数
    num = 7-j
    cnt = 0
    while cnt < num:
        cnt += 1
        #print(ans[-cnt])
        if S[-cnt] != ans[-cnt]:
            return ('NO')
    return ('YES')
print(main())

Buggy submission (verdict: Runtime Error):
def main():
    S = input()
    if S[0] != 'k':
        return ('NO')
    elif S = 'keyence':
        return ('YES')

    ans = 'keyence'
    i = 0
    j = 0
    while True:
        i += 1
        j += 1
        if S[i] != ans[j]:
            break

    #残りの文字数
    num = 7-j
    cnt = 0
    while cnt < num:
        cnt += 1
        #print(ans[-cnt])
        if S[-cnt] != ans[-cnt]:
            return ('NO')
    return ('YES')
print(main())

Buggy submission (verdict: Runtime Error):
def main():
    S = input()
    if S[0] != 'k':
        return ('NO')

    ans = 'keyence'
    i = 0
    j = 0
    while True:
        i += 1
        j += 1
        if S[i] != ans[j]:
            break

    #残りの文字数
    num = 7-j
    cnt = 0
    while cnt < num:
        cnt += 1
        #print(ans[-cnt])
        if S[-cnt] != ans[-cnt]:
            return ('NO')
    return ('YES')
print(main())

Buggy submission (verdict: Runtime Error):
def main():
    S = input()
    if S[0] != 'k':
        return ('NO')

    ans = 'keyence'
    i = 0
    while True:
        i += 1
        j += 1
        if S[i] != ans[j]:
            break

    #残りの文字数
    num = 7-j
    cnt = 0
    while cnt <= num:
        cnt += 1
        if S[-cnt] != ans[-cnt]:
            return ('NO')
    return ('YES')
print(main())