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

Fixed submission:
S = input()
N = int(input())

for i in range(min(N,len(S))):
    if S[i] != "1":
        print(S[i])
        quit()

print(1)

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

for i in range(min(N,K)):
    if S[i] != "1":
        print(S[i])
        quit()

print(1)

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

for i in range(min(N,K):
    if S[i] != "1":
        print(S[i])
        quit()

print(1)
Problem p03289 (python)

Fixed submission:
S = input()
ans = False
if(S[0]=="A" and S[2:len(S)-1].find("C") != -1 and S.count("C") == 1):
    S = S.replace("C","c")
    ans = S[1:].islower()
if(ans):
    print("AC")
else:
    print("WA")

Buggy submission (verdict: Runtime Error):
S = input()
if(S[0]=="A" and S.find("C") != -1):
    S = S.replace("C","c")
    ans = S[1:].islower()
if(ans):
    print("AC")
else:
    print("WA")
Problem p03293 (python)

Fixed submission:
S = input()
T = input()
leng = len(S)
ans = False

for i in range(leng):
    if(S == T):
        ans = True
    S = S[-1] + S[0:-1]
if(ans):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
S = input()
T = input()
leng = len(S)
S = sorted(S)
T = sorted(T)
ans = True
for i in range(leng):
    if(S[i] != T[i]):
        ans = False
if(ans):
    print("Yes")
else:
    print"No
Problem p03352 (python)

Fixed submission:
X =int(input())
ans = 0
for i in range(1,X+1):
    for j in range(2,11):
        A = i ** j
        if(A<=X):
            ans = max(ans,A)
print(ans)

Buggy submission (verdict: Runtime Error):
Jupyter Notebook
ABC098B
Current Kernel Logo
Python 3 
File
Edit
View
Insert
Cell
Kernel
Widgets
Help

X =int(input())
ans = 0
for i in range(1,X+1):
    for j in range(2,11):
        A = i ** j
        if(A<=X):
            ans = max(ans,A)
print(ans)
Problem p03424 (python)

Fixed submission:
N = int(input())
ans = False
s = list(input().split())
for i in s:
    if(i == "Y"):
        ans = True
if(ans):
    print("Four")
else:
    print("Three")

Buggy submission (verdict: Runtime Error):
N = int(input())
ans = False
for i in range(N):
    s = input()
    if(s == "Y"):
        ans = True
if(ans):
    print("Four")
else:
    print("Three")
Problem p03456 (python)

Fixed submission:
a,b = map(int,input().split())
if (b == 100):
    AB = a * 1000 + b
elif(b > 9):
    AB = a * 100 + b
else:
    AB = a * 10 + b
cnt = 1
ans = False
while(True):
    x = cnt * cnt
    if(x == AB):
        ans = True
    if(x > AB):
        break
    cnt += 1
if(ans):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if (b == 100):
    AB = a * 1000 + b
else if(b > 9):
    AB = a * 100 + b
else:
    AB = a * 10 + b
cnt = 1
ans = False
while(True):
    x = cnt * cnt
    if(x == AB):
        ans = True
    if(x > AB):
        break
    cnt += 1
if(ans):
    print("Yes")
else:
    print("No")
Problem p03778 (python)

Fixed submission:
W,a,b = map(int,input().split())
if(abs(b-a) < W):
    print(0)
else:
    ans = abs(b - a) - W
    print(ans)

Buggy submission (verdict: Runtime Error):
W,a,b = map(int,input().split())
if((abs(b-a) < W):
    print(0)
else:
    ans = abs(b - a) - W
    print(ans)
Problem p03944 (python)

Fixed submission:
W,H,N = map(int,input().split())
zero = [0,0]
X = [W,H]
ans = True
for i in range(N):
    x,y,a = map(int,input().split())
    if(a == 1):
        if zero[0] < x < X[0]:
            zero[0] = x
        elif X[0] <= x:
            ans = False
            break
    elif(a == 2):
        if zero[0] < x < X[0]:
            X[0] = x
        elif zero[0] >= x:
            ans = False
            break
    elif(a == 3):
        if zero[1] < y < X[1]:
            zero[1] = y
        elif X[1] <= y:
            ans = False
            break
    elif(a == 4):
        if zero[1] < y < X[1]:
            X[1] = y
        elif zero[1] >= y:
            ans = False
            break
if(ans):
    S = (X[1] - zero[1]) * (X[0] - zero[0])
    print(S)
else:
    print(0)

Buggy submission (verdict: Runtime Error):
W,H,N = map(int,input().split())
zero = [0,0]
X = [W,H]
ans = True
for i in range(N):
    x,y,a = map(int,input().split())
    if(a == 1):
        if zero[0] < x < X[0]:
            zero[0] = x
        elif X[0] =< x:
            ans = False
            break
    elif(a == 2):
        if zero[0] < x < X[0]:
            X[0] = x
        elif zero[0] => x:
            ans = False
            break
    elif(a == 3):
        if zero[1] < y < X[1]:
            zero[1] = y
        elif X[1] =< y:
            ans = False
            break
    elif(a == 4):
        if zero[1] < y < X[1]:
            X[1] = y
        elif zero[0] => y:
            ans = False
            break
if(ans):
    S = (X[1] - zero[1]) * (X[0] - zero[0])
    print(S)
else:
    print(0)
Problem p03994 (python)

Fixed submission:
s = input()
K = int(input())

ans = []

for i in s:
    if i == "a":
        ans.append("a")
        continue
    
    if ord(i) + K >= ord("z") + 1:
        ans.append("a")
        K -= ord("z") + 1 - ord(i)
    
    else:
        ans.append(i)
        


last = (K + ord(ans[-1]) - ord('a')) % 26
ans[-1] = chr(ord("a") + last)
print(''.join(ans))

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

ans = ""
for i,value in enumerate(s):
    ask = ord(value)
    if K + ord(value) - ord("a") > 26:
        ans = ans + "a"
        K -= ord("z")  - ord(value) + 1
    else:
        ans = ans + value
    
if K > 0:
    if ord(ans[-1]) + K > ord("z"):
        last = chr(ord(ans[-1]) + K -26)
        ans = ans[:-1] +last
    else:
        last = chr(ord(ans[-1]) + K )
        ans = ans[:-1] +last
        
print(ans)

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

ans = ""
for i,value in enumerate(s):
    
    ask = ord(value)
    if K + ord(value) - ord("a") > 26:
        ans = ans + "a"
        K -= ord("z")  - ord(value) + 1
    else:
        ans = ans + s[i:]
        break
    
if K > 0:
    if ord(ans[-1]) + K > ord("z"):
        last = chr(ord(ans[-1]) + K -26)
        ans = ans[:-1] +last
    else:
        last = chr(ord(ans[-1]) + K )
        ans = ans[:-1] +last
        
print(ans)
Problem p03128 (python)

Fixed submission:

def main():
    # N=int(input())
    N,M = list(map(int,input().split()))
    a = list(map(int,input().split()))
    c = [2,5,5,4,5,6,3,7,6]
    dp = [int(-1e7) for _ in range(N+1)]
    dp[0] = 0
    for i in range(1,N+1):
        for j in a:
            if i-c[j-1]>=0:
                dp[i] = max(dp[i],dp[i-c[j-1]]+1)
    ans = ""
    now = N
    for _ in range(dp[N]):
        ag = -1
        ma = -1
        for j in a:
            if now - c[j-1] < 0:
                continue
            if dp[now]!=dp[now-c[j-1]]+1:
                continue
            if j > ma:
                ma = j
        now -= c[ma-1]
        ans += str(ma)
    print(ans)

if __name__=='__main__':
    main()

Buggy submission (verdict: Runtime Error):
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

def main():
    # N=int(input())
    N,M = list(map(int,input().split()))
    a = list(map(int,input().split()))
    c = [2,5,5,4,5,6,3,7,6]
    dp = [-1e7 for _ in range(N+1)]
    dp[0] = 0
    for i in range(1,N+1):
        for j in a:
            dp[i] = max(dp[i],dp[i-c[j-1]]+1)
    ans = ""
    now = N
    for _ in range(dp[N]):
        ag = -1
        ma = -1
        for j in a:
            if now - c[j-1] < 0:
                continue
            if dp[now]!=dp[now-c[j-1]]+1:
                continue
            if j > ma:
                ma = j
        now -= c[ma-1]
        ans += str(ma)
    print(ans)

if __name__=='__main__':
    main()
Problem p03837 (python)

Fixed submission:
# -*- coding: utf-8 -*-
INF=10**10

def main():
    
    n,m=list(map(int,input().split()))
    a=[0 for _ in range(m)]
    b=[0 for _ in range(m)]
    c=[0 for _ in range(m)]
    d=[[INF for i in range(n)] for i in range(n)]
    for i in range(m):
        a[i],b[i],c[i]=list(map(int,input().split()))
        a[i]-=1
        b[i]-=1
        d[a[i]][b[i]]=c[i]
        d[b[i]][a[i]]=c[i]
    
    for i in range(n):
        d[i][i]=0
    
    for k in range(n):
        for i in range(n):
            for j in range(n):
                d[i][j]=min(d[i][j],d[i][k]+d[k][j])
                d[j][i]=d[i][j]
    ans=0
    for j in range(m):
        temp=1
        for i in range(n):
            if d[i][b[j]]==d[i][a[j]]+c[j]:
                temp=0
                break
        ans+=temp
    print(ans)
    
    
    
        
        
    
if __name__=="__main__":
    main()

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

def main():
    
    n,m=list(map(int,input().split()))
    a=[0 for _ in range(n)]
    b=[0 for _ in range(n)]
    c=[0 for _ in range(n)]
    d=[[INF for i in range(n)] for i in range(n)]
    for i in range(m):
        a[i],b[i],c[i]=list(map(int,input().split()))
        a[i]-=1
        b[i]-=1
        d[a[i]][b[i]]=c[i]
        d[b[i]][a[i]]=c[i]
    
    for i in range(n):
        d[i][i]=0
    
    for k in range(n):
        for i in range(n):
            for j in range(n):
                d[i][j]=min(d[i][j],d[i][k]+d[k][j])
                d[j][i]=d[i][j]
    ans=0
    for j in range(m):
        temp=1
        for i in range(n):
            if d[i][b[j]]==d[i][a[j]]+c[j]:
                temp=0
                break
        ans+=temp
    print(ans)
    
    
    
        
        
    
if __name__=="__main__":
    main()

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

def main():
    
    n,m=list(map(int,input().split()))
    a=[0 for _ in range(n)]
    b=[0 for _ in range(n)]
    c=[0 for _ in range(n)]
    d=[[INF for i in range(n)] for i in range(n)]
    for i in range(n):
        a[i],b[i],c[i]=list(map(int,input().split()))
        a[i]-=1
        b[i]-=1
        d[a[i]][b[i]]=c[i]
        d[b[i]][a[i]]=c[i]
    
    for i in range(n):
        d[i][i]=0
    
    for k in range(n):
        for i in range(n):
            for j in range(n):
                d[i][j]=min(d[i][j],d[i][k]+d[k][j])
                d[j][i]=d[i][j]
    ans=0
    for j in range(m):
        temp=1
        for i in range(n):
            if d[i][b[j]]==d[i][a[j]]+c[j]:
                temp=0
                break
        ans+=temp
    print(ans)
    
    
    
        
        
    
if __name__=="__main__":
    main()
Problem p04031 (python)

Fixed submission:
# -*- coding: utf-8 -*-
INF=10**10

def main():
    
    n=int(input())
    array=list(map(int,input().split()))
    
    answer=INF
    
    for a in range(-100,101):
        temp=0
        for b in array:
            temp+=(a-b)**2
        if temp<answer:
            answer=temp
    print(answer)
            

if __name__=="__main__":
    main()

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

def main():
    
    n=int(input())
    array=[int(input()) for i in range(n)]
    
    answer=INF
    
    for a in range(-100,101):
        temp=0
        for b in array:
            temp+=(a-b)**2
        if temp<answer:
            answer=temp
    print(answer)
            

if __name__=="__main__":
    main()

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
INF=10**20

def main():
    
    n=int(input())
    array=[int(input()) for i in range(n)]
    
    answer=INF
    
    for a in range(-100,101):
        temp=0
        for b in array:
            temp+=(a-b)**2
        if temp<answer:
            answer=temp
    print(answer)
            

if __name__=="__main__":
    main()
Problem p04032 (python)

Fixed submission:
# -*- coding: utf-8 -*-
INF=10**10

def main():
    
    str=input()
    n=len(str)
    if n==2:
        if str[0]==str[1]:
            print("1 2")
            return 0
        else:
            print("-1 -1")
            return 0
        
    
    for i in range(n-2):
        temp=str[i:i+3]
        for j in range(2):
            for k in range(j+1,3): #(0,1),(0,2),(1,2)
                if temp[j]==temp[k]:
                    print("{0} {1}".format(i+1,i+3))
                    return 0
    print("-1 -1")
    
if __name__=="__main__":
    main()

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

def main():
    
    str=input()
    n=len(str)
    if n==2:
        if str[0]==str[1]:
            print("1 2")
        else:
            print("-1 -1")
        
    
    for i in range(n-1):
        temp=str[i:i+3]
        for j in range(2):
            for k in range(j+1,3):
                if temp[j]==temp[k]:
                    print("{0} {1}".format(i+1,i+3))
                    return 0
    print("-1 -1")
    
if __name__=="__main__":
    main()

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

def main():
    
    str=input()
    n=len(str)
    if n==2:
        str("-1 -1")
        return 0
    
    for i in range(n-2):
        temp=str[i:i+3]
        for j in range(2):
            for k in range(j+1,2):
                if temp[j]==temp[k]:
                    print("{0} {1}".format(i+1,i+3))
                    return 0
    print("-1 -1")
    
if __name__=="__main__":
    main()
Problem p02573 (python)

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

par = [i + 1 for i in range(n)]
rank = [1] * n
size = [1] * n

def find(x):
    if par[x - 1] == x:
        return x
    else:
        return find(par[x - 1])

def union(x, y):
    x = find(x)
    y = find(y)
    if x == y:
        return
    if rank[x - 1] < rank[y - 1]:
        par[x - 1] = y
        size[y - 1] += size[x - 1]
    else:
        par[y - 1] = x
        size[x - 1] += size[y - 1]
        if rank[x - 1] == rank[y - 1]:
            rank[x - 1] += 1

for i in range(m):
    a, b = map(int, input().split())
    union(a, b)

print(max(size))

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

par = [i + 1 for i in range(n)]
rank = [0] * n
size = [1] * n

def find(x):
    if par[x - 1] == x:
        return x
    else:
        return find(par[x - 1])

def union(x, y):
    x = find(x)
    y = find(y)
    if rank[x] < rank[y]:
        par[x] = y
        size[x] += size[y]
    else:
        par[y] = x
        size[y] += size[x]
        if rank[x] == rank[y]:
            rank[x] += 1

for i in range(m):
    a, b = map(int, input().split())
    union(a, b)

print(max(size))
Problem p02664 (python)

Fixed submission:
t = input()

s = list(t)

for i in range(len(s)):
    if s[i] == '?':
        if i > 0 and s[i - 1] == 'P':
            s[i] = 'D'
        elif i < len(s) - 1 and s[i + 1] == 'D':
            s[i] = 'P'
        else:
            s[i] = 'D'

print(''.join(s))

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

s = list(t)

for i in range(len(s)):
    if s[i] == '?':
        if i == 0:
            s[i] = 'D'
        if i < len(s) and s[i + 1] == 'P':
            s[i] = 'D'
        elif s[i - 1] == 'P':
            s[i] = 'D'
        elif s[i - 1] == 'D':
            s[i] = 'P'

print(''.join(s))
Problem p02675 (python)

Fixed submission:
N = int(input())
x = N % 10
#xはNを10で割ったあまり

if x == 2 or x == 4 or x == 5 or x == 7 or x == 9:
    k = 'hon'
elif x == 0 or x == 1 or x == 6 or x == 8:
    k = 'pon'
elif x == 3:
    k = 'bon'

print(k)

Buggy submission (verdict: Runtime Error):
N = input()
x = N % 10
#xはNを10で割ったあまり

if x == 2 or x == 4 or x == 5 or x == 7 or x == 9:
    k = 'hon'
elif x == 0 or x == 1 or x == 6 or x == 8:
    k = 'pon'
elif x == 3:
    k = 'bon'

print(k)

Buggy submission (verdict: Runtime Error):
N = input()
x = N % 10
#xはNを10で割ったあまり

if x == 2 or x == 4 or x == 5 or x == 7 or x == 9:
    k = 'hon'
elif x == 0 or x == 1 or x == 6 or x == 8:
    k = 'pon'
else:
    k = 'bon'

print(k)
Problem p02677 (python)

Fixed submission:
a, b, h, m = input().split()

a = int(a)
b = int(b)
h = int(h)
m = int(m)

#長針は60分で一周、短針は720分で一周
#長針は1分で6、短針は1分で0.5 合わせて5.5度離れる

min = (60 * h) + m
ang0 = (min * 5.5) % 360

if ang0 <= 180:
    ang = ang0
else:
    ang = 360 - ang0

import math
cos_ang = math.cos(math.radians(ang))

x = math.sqrt((a ** 2) + (b ** 2) - (2 * a * b * cos_ang))

print(x)

Buggy submission (verdict: Runtime Error):
a, b, h, m = input().split()

a, b, h, m = int(a, b, h, m)

#長針は60分で一周、短針は720分で一周
#長針は1分で6、短針は1分で0.5 合わせて5.5度離れる

min = (60 * h) + m
ang0 = (min * 5.5) % 360

if ang0 <= 180:
    ang = ang0
else:
    ang = 360 - ang0

import math
cos_ang = math.cos(math.radians(ang))

x = math.sqrt((a ** 2) + (b ** 2) - (2 * a * b * cos_ang))

print(x)

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

#長針は60分で一周、短針は720分で一周
#長針は1分で6、短針は1分で0.5 合わせて5.5度離れる

min = (60 * h) + m
ang0 = (min * 5.5) % 360

if ang0 <= 180:
    ang = ang0
else:
    ang = 360 - ang0

import math
cos_ang = math.cos(math.radians(ang))

x = math.sqrt((a ** 2) + (b ** 2) - (2 * a * b * cos_ang))

print(x)

Buggy submission (verdict: Runtime Error):
a, b, h, m = int(input().spllit())

#長針は60分で一周、短針は720分で一周
#長針は1分で6、短針は1分で0.5 合わせて5.5度離れる

min = (60 * h) + m
ang0 = (min * 5.5) % 360

if ang0 <= 180:
    ang = ang0
else:
    ang = 360 - ang0

import math
cos_ang = math.cos(math.radians(ang))

x = math.sqrt((a ** 2) + (b ** 2) - (2 * a * b * cos_ang))

print(x)
Problem p02718 (python)

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

b = sum(a) / (4 * m)
ans = 0
for i in range(n):
    if a[i] >= b:
      ans += 1

if ans >= m:
    print('Yes')
else:
    print('No')

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

b = sum(a) / 4
count = 0
for i in range(n):
    if a[i] >= b:
      ans += 1
      
if ans >= m:
    print('Yes')
else:
    print('No')
Problem p02719 (python)

Fixed submission:
n, k = map(int, input().split())
s = n % k
s2 = k - s
print(min(s, s2))

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

a = []
for i in range(n):
    n = abs(n - k)
    a.append(n)
    
print(min(a))
Problem p02742 (python)

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

if h == 1 or m == 1:
    count = 1
else:
    count = ((h //2) * m) + ((h %2) *((m //2) + (m %2)))
print(count)

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

count = ((h //2) * m) + ((h %2) *((m //2) + (m %2))
print(count)
Problem p02755 (python)

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

import math
aS = math.ceil(a / 0.08)
al = math.floor((a + 1) / 0.08)
bs = math.ceil(b / 0.10)
bl = math.floor((b + 1) / 0.10)

flag = True
for i in range(10000):
    if aS <= i < al and bs <= i < bl:
        print(i)
        flag = False
        break
if flag:
    print(-1)

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

import math
aS = math.ceil(a / 0.08)
al = math.floor((a + 1) / 0.08)
bs = math.ceil(b / 0.10)
bl = math.floor((b + 1) / 0.10)

for i in range(1000):
    if aS <= i < al and bs <= i < bl:
        print(i)
        flag = False
        break
if flag:
    print(-1)

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

import math
as = math.ceil(a / 0.08)
al = math.floor((a + 1) / 0.08)
bs = math.ceil(b / 0.10)
bl = math.floor((b + 1) / 0.10)

for i in range(1000):
    if as <= i < al and bs <= i < bl:
        print(i)
        break
Problem p02767 (python)

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

sum_list = []
start = min(x)
stop = max(x)
for i in range(1, 100):
    sum = 0
    for j in x:
        sum += (i - j) ** 2
    sum_list.append(sum)

print(min(sum_list))

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

sum_list = []
start = min(x)
stop = max(x)
for i in range(start, stop):
    sum = 0
    for j in x:
        sum += (i - j) ** 2
    sum_list.append(sum)

print(min(sum_list))

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

sum_list = []
start = min(x)
stop = max(x)
for i in range(start, stop):
    sum = 0
    for j in x:
        sum += (i - j) ** 2
    sum_list.append(sum)

print(min(sum_list))

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

sum_list = []
for i in range(min(x), max(x)):
    sum = 0
    for j in x:
        sum += (x[i] - x[j]) ** 2
    sum_list.append(sum)
    
print(min(sum_list))
Problem p02783 (python)

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

ans = h // a
if h % a == 0:
    print(ans)
else:
    print(ans + 1)

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

ans = h // a
if h % a == 0:
    print(ans)
esle:
    print(ans + 1)
Problem p02791 (python)

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

count = 0
m = a[0]
for i in range(n):
    if a[i]  <= m:
        m = a[i]
        count += 1
print(count)

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

count = 0
for i in range(n):
    if a[i] <= min(a[:i]):
        count += 1
print(count)
Problem p02801 (python)

Fixed submission:
c = input()

l = [chr(i) for i in range(97, 123)]
print(l[l.index(c) + 1])

Buggy submission (verdict: Runtime Error):
c = input()

l = [chi(i) for i in range(65, 91)]
print(l[l.index(c) + 1])
Problem p02842 (python)

Fixed submission:
n = int(input())

import math

x = math.ceil(n / 1.08)
m = math.floor(x * 1.08)

if m == n:
    print(int(x))
else:
    print(':(')

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

import.math

x = n / 1.08
m = math.floor(n * 1.08)

if m == n:
    print(x)
else:
    print(':(')
Problem p02899 (python)

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

l = [0] * n

for i in range(n):
    l[a[i] - 1] = i + 1

print(*l)

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

l = []
for i in range(n):
    x = l.index(i + 1) + 1
    l.append(x)
    
print(' ', join(l))

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

l = []
for i in range(n):
    x = index(i + 1) + 1
    l.append(x)
    
print(' ', join(l))
Problem p02911 (python)

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

points = [k - q] * n
for i in range(q):
    points[l[i] - 1] += 1
for i in points:
    if i <= 0:
        print('No')
    else:
        print('Yes')

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

points = [k] * n
for i in range(q):
    points = map(lambda x: x - 1, points)
    points[l[i] - 1] += 2
for i in points:
    if i <= 0:
        print('No')
    else:
        print('Yes')
Problem p02922 (python)

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

x = 1
num = 0
while True:
    if b == 1:
        num = 0
        break
    x += (a - 1)
    num += 1
    if x >= b:
        break
        
print(num)

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

x = 1
num = 0
while True:
    x += a - 1
    num += 1
    if x >= b:
        break
        
print(num)
Problem p02971 (python)

Fixed submission:
n = int(input())
a = [int(input()) for i in range(n)]

l = sorted(a, reverse=True)
m = a.index(l[0])
for i in range(n):
    if i == m:
        print(l[1])
    else:
        print(l[0])

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(input()) for i in range(n)]

l = sorted(a, reverse=True)
m = a.index(a(max))
for i in range(n):
    if i == m:
        print(l[1])
    else:
        print(l[0])