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

Fixed submission:
N=int(input())
H=list(map(int,input().split()))
count=0
ans=[]

for i in range(1,len(H)):
    if H[-i]<=H[-i-1]:
        count+=1
    else:
        ans.append(count)
        count=0
ans.append(count)
print(max(ans))

Buggy submission (verdict: Runtime Error):
N=int(input())
H=list(map(int,input().split()))
count=0
ans=[]

for i in range(1,len(H)):
    if H[-i]<=H[-i-1]:
        count+=1
    else:
        ans.append(count)
        count=0

print(max(ans))
Problem p02953 (python)

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

if N==1:
    print('Yes')
else:
    for i in range(N-1):
        if H[N-i-2]>= H[N-i-1]+2:
            print('No')
            exit()
        elif H[N-i-2]==H[N-i-1]+1:
            H[N-i-2]-=1
    
    for j in range(N-1):
        if  H[i]>H[i+1]:
            print('No')
            exit()
    print('Yes')

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

if N==1:
    print('Yes')
else:
    for i in range(N-1):
        if H[N-i-2]>= H[N-i-1]+2:
            print('No')
            exit()
        elif H[N-i-2]==H[N-i-1]+1:
            H[[N-i-2]-=1
    
    for j in range(N-1):
        if  H[i]>H[i+1]:
            print('No')
            exit()
    print('Yes')
Problem p03076 (python)

Fixed submission:
A=list(int(input()) for _ in range(5))
B=[]
C=[]
for i in A:
    if i%10!=0:
        B.append(i%10)
        C.append((i//10+1)*10)
    else:
        C.append(i)
if len(B)>0:
    c=10-min(B)
else:
    c=0
print(sum(C)-c)

Buggy submission (verdict: Runtime Error):
A=list(int(input()) for _ in range(5))
B=[]
C=[]
for i in A:
    if i%10!=0:
        B.append(i%10)
        C.append((i//10+1)*10)
    else:
        C.append(i)
c=10-min(B)
print(sum(C)-c)
Problem p03086 (python)

Fixed submission:
S=input()
ACGT=['A','C','G','T']
ans=[0]
k=0
while k<len(S):
    num=0
    if S[k] in ACGT:
        num=1
        for i in range(1,len(S)-k):
            if S[k+i] in ACGT:
                num+=1
            else:
                break
        ans.append(num)
    else:
        num=1
    k+=num

print(max(ans))

Buggy submission (verdict: Runtime Error):
S=input()
ACGT=['A','C','G','T']
ans=[]
k=0
while k<len(S):
    num=0
    if S[k] in ACGT:
        num=1
        for i in range(1,len(S)-k):
            if S[k+i] in ACGT:
                num+=1
            else:
                break
        ans.append(num)
    else:
        num=1
    k+=num

print(max(ans))
Problem p03160 (python)

Fixed submission:
N=int(input())
H=list(map(int,input().split()))
dp=[0]*N
dp[0]=0
dp[1]=abs(H[1]-H[0])

for i in range(2,N):
    dp[i]=min(dp[i-2]+abs(H[i]-H[i-2]),dp[i-1]+abs(H[i]-H[i-1]))

print(dp[N-1])

Buggy submission (verdict: Runtime Error):
N=int(input())
H=list(map(int,input().split()))
dp=[0]*N
def cost(n):
    if dp[n-1]:
        return dp[n-1]
    if n==1:
        return 0
    elif n==2:
        return abs(H[1]-H[0])
    else:
        ans=min(cost(n-2)+abs(H[n-1]-H[n-3]),cost(n-1)+abs(H[n-1]-H[n-2]))
        dp[n-1]=ans
        return ans

print(cost(N))

Buggy submission (verdict: Runtime Error):
N=int(input())
H=list(map(int,input().split()))
dp=[0]*N
def cost(n):
    if dp[n-1]:
        return dp[n-1]
    elif n==1:
        return 0
    elif n==2:
        return abs(H[1]-H[0])
    else:
        ans=min(cost(n-2)+abs(H[n-1]-H[n-3]),cost(n-1)+abs(H[n-1]-H[n-2]))
        dp[n-1]=ans
        return ans

print(cost(N))

Buggy submission (verdict: Runtime Error):
N=int(input())
H=list(map(int,input().split()))
dp=[0]*N
def cost(n):
    if dp[n-1]:
        return dp[n-1]
    elif n==1:
        return 0
    elif n==2:
        return abs(H[1]-H[0])
    else:
        ans=min(cost(n-2)+abs(H[n-1]-H[n-3]),cost(n-1)+abs(H[n-1]-H[n-2]))
    dp[n-1]=ans
    return ans

print(cost(N))

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

def cost(n):
    if n==1:
        return 0
    if n==2:
        return abs(H[1]-H[0])
    else:
        ans=min(cost(n-2)+abs(H[n-1]-H[n-3]),cost(n-1)+abs(H[n-1]-H[n-2]))
    return ans

print(cost(N))

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

def cost(n):
    if n==1:
        return 0
    if n==2:
        return H[1]-H[0]
    else:
        ans=min(cost(n-2)+abs(H[n-1]-H[n-3]),cost(n-1)+abs(H[n-1]-H[n-2]))
    return ans

print(cost(N))
Problem p03211 (python)

Fixed submission:
S=input()
length=len(S)
ans=[]
for i in range(length-2):
  num=int(S[i:i+3])
  ans.append(abs(num-753))
print(min(ans))

Buggy submission (verdict: Runtime Error):
S=input()
length=len(S)
ans=[]
for i in range(S-2):
  num=int(S[i:i+3])
  ans.append(abs(num-753))
print(min(ans))
Problem p03261 (python)

Fixed submission:
N=int(input())
A=[]
for _ in range(N):
    W=input()
    if W in A:
        print('No')
        exit()
    else:
        A.append(W)

for i in range(N-1):
    if A[i][-1]!=A[i+1][0]:
        print('No')
        exit()
print('Yes')

Buggy submission (verdict: Runtime Error):
N=int(input())
A=[]
for _ in range(N):
    W=input()
    if W in A:
        print('No')
        exit()
    else:
        W.append(A)

for i in range(N-1):
    if A[i][-1]!=A[i+1][-1]:
        print('No')
        exit()
print('Yes')
Problem p03281 (python)

Fixed submission:
N=int(input())
ans=0
for i in range(1,N+1):
    count=0
    for j in range(1,i+1):
        if i%j==0:
            count+=1
    if count==8 and i%2!=0:
        ans+=1
        
print(ans)

Buggy submission (verdict: Runtime Error):
N=int(input())
ans=0
for i in range(1,N):
    count=0
    for j in range(i):
        if i%j==0:
            count+=1
    if count==9:
        ans+=1
        
print(ans)

Buggy submission (verdict: Runtime Error):
N=input()
ans=0
for i in range(1,N):
    count=0
    for j in range(i):
        if i%j==0:
            count+=1
    if count==9:
        ans+=1
        
print(ans)
Problem p03361 (python)

Fixed submission:
H,W=map(int,input().split())
endmap=[list(s for s in input()) for _ in range(H)]
exlarge=[[0]*(W+2) for _ in range(H+2)]
ans='Yes'
for i in range(H):
  for j in range(W):
    if endmap[i][j]=='#':
      exlarge[i+1][j+1]=1
 
for k in range(H+2):
  for l in range(W+2):
    if exlarge[k][l]==1 and exlarge[k][l-1]== exlarge[k][l+1]==exlarge[k-1][l]==exlarge[k+1][l]==0:
          ans='No'
 
print(ans)

Buggy submission (verdict: Runtime Error):
H,W=map(int,input().split())
endmap=[list(s for s in input()) for _ in range(H)]
exlarge=[[0]*(W+2)*(H+2)]
ans='Yes'
for i in range(H):
  for j in range(W):
    if endmap[i][j]=='#':
      exlarge[i+1][j+1]=1
 
for k in range(H+2):
  for l in range(W+2):
    if exlarge[k][l]==1: 
        if exlarge[k][l-1]== exlarge[k][l+1]==exlarge[k-1][l]==exlarge[k+1][l]==0:
          ans='No'
 
print(ans)

Buggy submission (verdict: Runtime Error):
H,W=map(int,input().split())
endmap=[list(s for s in input()) for _ in range(H)]
exlarge=[[0]*(W+2)*(H+2)]
ans='Yes'
for i in range(H):
  for j in range(W):
    if endmap[i][j]=='#':
      exlarge[i+1][j+1]=1
 
for k in range(H+2):
  for l in range(W+2):
    if exlarge[k][l]==1: 
        if exlarge[k][l-1]!=1 or exlarge[k][l+1]!=1 or exlarge[k-1][l]!=1 or exlarge[k+1][l]!=1:
          ans='No'
 
print(ans)

Buggy submission (verdict: Runtime Error):
H,W=map(int,input().split())
endmap=[list(s for s in input()) for _ in range(H)]
exlarge=[[0]*(W+2)*(H+2)]
ans='Yes'
for i in range(H):
  for j in range(W):
    if endmap[i][j]=='#':
      exlarge[i+1][j+1]=1

for k in range(H+2):
  for l in range(W+2):
    if endmap[k][l]==1: 
        if endmap[k][l-1]!=1 or endmap[k][l+1]!=1 or endmap[k-1][l]!=1 or endmap[k+1][l]!=1:
          ans='No'

print(ans)

Buggy submission (verdict: Runtime Error):
H,W=map(int,input().split())
endmap=[list(s for s in input()) for _ in range(H)]
exlarge=[[0]*(W+2)*(H+2)]
ans='Yes'
for i in range(H):
  for j in range(W):
    if endmap[i][j]=='#':
      exlarge[i+1][j+1]=1

for k in range(H+2):
  for l in range(W+2):
    if endmap[i][j]==1: 
        if endmap[i][j-1]!=1 or endmap[i][j+1]!=1 or endmap[i-1][j]!=1 or endmap[i+1][j]!=1:
          ans='No'

print(ans)
Problem p03416 (python)

Fixed submission:
A,B=input().split()
a=int(A[0])*10+int(A[1])
b=int(B[0])*10+int(B[1])
d=int(A[1])*10+int(A[0])
e=int(B[1])*10+int(B[0])
count_small=0
count_large=0
if a==b:
    for i in range(0,10):
        if a*1000+d+i*100>=int(A) and b*1000+e+i*100<=int(B):
            count_small+=1
    ans=count_small
else:
    for i in range(0,10):
        if a*1000+d+i*100>=int(A):
            count_small+=1
        if b*1000+e+i*100<=int(B):
            count_large+=1
    ans=(b-a-1)*10+count_small+count_large
print(ans)

Buggy submission (verdict: Runtime Error):
A,B=input().split()
a=int(A[0])*10+int(A[1])
b=int(B[0])*10+int(B[1])
d=int(A[1])*10+int(A[0])
e=int(B[1])*10+int(B[0])
count_small=0
count_large=0
if a==b:
    for i in range(0,10):
        if a*1000+d+i*100>=int(A) and b*1000+e+i*100<=int(B):
            count_small+=1
            ans=count_small
else:
    for i in range(0,10):
        if a*1000+d+i*100>=int(A):
            count_small+=1
        if b*1000+e+i*100<=int(B):
            count_large+=1
    ans=(b-a-1)*10+count_small+count_large
print(ans)

Buggy submission (verdict: Runtime Error):
A,B=input().split()
a=int(A[0])*10+int(A[1])
b=int(B[0])*10+int(B[1])
d=int(A[1])*10+int(A[0])
e=int(B[1])*10+int(B[0])
count_small=0
count_large=0
if a==b:
    for i in range(0,9):
        if a*1000+d+i*100>=int(A) and b*1000+e+i*100<=int(B):
            count_small+=1
            ans=count_small
else:
    for i in range(0,10):
        if a*1000+d+i*100>=int(A):
            count_small+=1
        if b*1000+e+i*100<=int(B):
            count_large+=1
    ans=(b-a-1)*10+count_small+count_large
print(ans)

Buggy submission (verdict: Runtime Error):
A,B=input().split()
a=int(A[0])*10+int(A[1])
b=int(B[0])*10+int(B[1])
d=int(A[1])*10+int(A[0])
e=int(B[1])*10+int(B[0])
count_small=0
count_large=0
if a==b:
    for i in range(0,9):
        if a*1000+d+i*100>=int(A) and b*1000+e+i*100<=int(B):
            count_small+=1
            ans=count_small
else:
    for i in range(0,10):
        if a*1000+d+i*100>=int(A):
            count_small+=1
        if b*1000+e+i*100<=int(B):
            count_large+=1
    ans=(b-a-1)*10+count_small+count_large
print(ans)
print(count_large)
print(count_small)

Buggy submission (verdict: Runtime Error):
A,B=input().split()
a=int(A[0])*10+int(A[1])
b=int(B[0])*10+int(B[1])
d=int(A[1])*10+int(A[0])
e=int(B[1])*10+int(B[0])
count_small=0
count_large=0
if a==b:
    for i in range(0,9):
        if a*1000+d+i*100>=int(A) and b*1000+e+i*100<=int(B):
            count_small+=1
            ans=count_small
else:
    for i in range(0,9):
        if a*1000+d+i*100>=int(A):
            count_small+=1
        if b*1000+e+i*100<=int(B):
            count_large+=1
    ans=(b-a-1)*10+count_small+count_large
print(ans)
Problem p03427 (python)

Fixed submission:
N = int(input())

for i in range(17):
    if 10**i <=N <10**(i+1):
        m=i+1
        break

for j in range(0,10):
    if (10**(m-1))*j + 10**(m-1)-1 <=N< (j+1)*(10**(m-1))+10**(m-1)-1:
        a = j
        break

print(a+9*(m-1))

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

for i in range(17):
    if 10**i <=N <10**(i+1):
        m=i+1
        break

for j in range(1,10):
    if (10**(m-1))*j + 10**(m-1)-1 <=N< (j+1)*(10**(m-1))+10**(m-1)-1:
        a = j
        break

print(a+9*(m-1))
Problem p03436 (python)

Fixed submission:
from collections import deque
H,W=map(int,input().split())
S=[]
count=0
for _ in range (H):
    A=list(input())
    for a in A:
        if a=='.':
            count+=1
    S.append(A)

mas=deque([(0,0,0)])
while mas:
    y,x,n=mas.popleft()
    if 0<=y<=H-1 and 0<=x<=W-1:
        if S[y][x]=='.':
            S[y][x]=n
            mas.append((y+1,x,n+1))
            mas.append((y,x+1,n+1))
            mas.append((y-1,x,n+1))
            mas.append((y,x-1,n+1))
short=S[H-1][W-1]
if short=='.':
    print(-1)
else:
    print(count-(short+1))

Buggy submission (verdict: Runtime Error):
from collections import deque
H,W=map(int,input().split())
S=[]
count=0
for _ in range (H):
    A=list(input())
    for a in A:
        if a=='.':
            count+=1
    S.append(A)

mas=deque([(0,0,0)])
while mas:
    y,x,n=mas.popleft()
    if 0<=y<=H-1 and 0<=x<=W-1:
        if S[y][x]=='.':
            S[y][x]=n
            mas.append((y+1,x,n+1))
            mas.append((y,x+1,n+1))
            mas.append((y-1,x,n+1))
            mas.append((y,x-1,n+1))
short=S[H-1][W-1]
print(count-(short+1))
Problem p03449 (python)

Fixed submission:
N = int(input())
a = [list(map(int,input().split())) for i in range(2)]
b = []
for i in range(0,N):
    s = 0
    v = 0
    for j in range(0,i+1):
        s += a[0][j]
    for j in range(i,N):
        v += a[1][j]
    b.append(s+v)
print(max(b))

Buggy submission (verdict: Runtime Error):
N= int(input())
A1=list(map(int,input().split()))
A2=list(map(int,input().split()))
ans=[]

if N==1:
    print(A1[0]+A2[0])
    exit()
else:
    for i in range(N):
        ansA1=0
        ansA2=0
        for j in range(i):
            ansA1+=A1[j]
        for k in range(j,N):
            ansA2+=A2[k]
        ans1=ansA1+ansA2
        ans.append(ans1)
    print(max(ans))

Buggy submission (verdict: Runtime Error):
N= int(input())
A1=list(map(int,input().split()))
A2=list(map(int,input().split()))
ans=[]

if N==1:
    print(A1[0]+A2[0])
    exit()
else:
    for i in range(N):
        ansA1=0
        ansA2=0
        for j in range(i):
            ansA1+=A1[j]
        for k in range(j,N):
            ansA2+=A2[k]
        ans1=ansA1+ansA2
        ans.append(ans1)

print(max(ans))

Buggy submission (verdict: Runtime Error):
N= int(input())
A1=list(map(int,input().split()))
A2=list(map(int,input().split()))
ans=[]

if N==1:
    print(A1[0]+A2[0])
else:
    for i in range(N):
        ansA1=0
        ansA2=0
        for j in range(i):
            ansA1+=A1[j]
        for k in range(j,N):
            ansA2+=A2[k]
        ans1=ansA1+ansA2
        ans.append(ans1)

print(max(ans))
Problem p03497 (python)

Fixed submission:
from collections import Counter
N,K=map(int,input().split())
N=list(map(int,input().split()))
A=Counter(N)
C=list(A.values())
C.sort(reverse=True)
if len(C)<=K:
    print(0)
else:
    ans=sum(C[-(len(C)-K):])
    print(ans)

Buggy submission (verdict: Runtime Error):
from collections import Counter
N,K=map(int,input().split())
N=list(map(int,input().split()))
A=Counter(N)
C=list(A.values())
C=C.sort(reverse=True)
if len(C)<=K:
    print(0)
else:
    ans=sum(C[-(len(C)-K):])
    print(ans)

Buggy submission (verdict: Runtime Error):
from collections import Counter
N,K=map(int,input().split())
N=list(map(int,input().split()))
A=Counter(N)
C=list(A.values())
C=C.sort(reverse=True)
print(C)
if len(C)<=K:
    print(0)
else:
    ans=sum(C[-(len(C)-K):])
    print(ans)
Problem p03639 (python)

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
a=0
b=0
for num in A:
    if num%2==1:
        a+=1
    elif num%4==0:
        b+=1

if N%2==1:
    if a>b+1:
        print('No')
    else:
        print('Yes')
else:
    if a<=b:
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
a=0
b=0
for num in A:
    if num%2==1:
        a+=1
    elif num%4==0:
        b+=1

if N==3:
    if a==3 or (a>=1 and b==0):
        print('No')
    else:
        print('Yes')
else:
    if a=<b:
        print('Yes')
    else:
        print('No')
Problem p03699 (python)

Fixed submission:
N=int(input())
S=list(int(input()) for _  in range(N))
S=sorted(S)
ans=0
if sum(S)%10!=0:
  ans=sum(S)
else:
    for i in range(N):
      if (sum(S)-S[i])%10!=0:
        ans=sum(S)-S[i]
        break
    
print(ans)

Buggy submission (verdict: Runtime Error):
N=int(input())
S=list(int(input()) for _ range(N))
S=sorted(S)
ans=0
if sun(S)%10!=0:
  ans=sum(S)
for i in range(N):
  if (sum(S)-S[i])%10!=0:
    ans=sum(S)-S[i]
    break
    
print(ans)
Problem p03845 (python)

Fixed submission:
N=int(input())
T=list(map(int,input().split()))
M=int(input())
total=0
for i in range(N):
    total+=T[i]
for i in range(M):
    K=total
    P,X=map(int,input().split())
    K=K-T[P-1]
    K+=X
    print(K)

Buggy submission (verdict: Runtime Error):
N=int(input())
T=list(map(int,input().split()))
M=int(input())
total=0
for i in range(N):
    total+=T[i]
for i in range(M):
    K=total
    P,X=map(int,input().split())
    K=K-T[i]
    K+=X
    print(K)
Problem p03844 (python)

Fixed submission:
li = input().split()
 
if li[1] == "+":
  print(int(li[0])+int(li[2]))
else:
  print(int(li[0])-int(li[2]))

Buggy submission (verdict: Runtime Error):
li = input().split()

if li[1] == "+":
  print(int(li[0]+li[2]))
else:
  print(int(li[0]-li[2]))
Problem p02675 (python)

Fixed submission:
N=int(input())
N=str(N)
N = int(N[-1])
if (N==2 or N==4 or N==5 or N==7 or N==9):
  print("hon")
elif (N==0 or N==1 or N==6 or N==8):
  print("pon") 
else:
  print("bon")

Buggy submission (verdict: Runtime Error):
N=input()
N=int(input())
N=str(N)
N = (N[-1])
if (N==2 or N==4 or N==5 or N==7 or N==9):
  print("hon")
elif (N==0 or N==1 or N==6 or N==8):
  print("pon") 
elif (N==3):
  print("bon")
Problem p02791 (python)

Fixed submission:
n = int(input())
m = [int(i) for i in input().split()]
mi = 2*10**5+1
h = 0

for i in range (n):
  if mi>m[i]:
    mi=m[i]
    h+=1

    
print(h)

Buggy submission (verdict: Runtime Error):
n = int(input())
m = [int(i) for i in input().split()]
mi = 2*10**5+1
h = 0
if n!=1:
  for i in range (n):
    if mi>m[i]:
      mi=m[i]
      h+=1
    g+=1
  print(h)
else:
  print(n)

Buggy submission (verdict: Runtime Error):
n = int(input())
m = [int(i) for i in input().split()]
mi = 2*10**5+1
h = 0
if n!=1:
  for i in range (n):
    if mi>m[i]:
      mi=m[i]
      h+=1
    g+=1
  print(h)
else:
  print(n)

Buggy submission (verdict: Runtime Error):
n = int(input())
m = [int(i) for i in input().split()]
mi = 2*10**5+1
h = 0
if n!=1:
  for i in range (n):
    if mi>m[i]:
      mi=m[i]
      h+=1
    g+=1
  print(h)
else:
  print(n)

Buggy submission (verdict: Runtime Error):
n = int(input())
m = [int(i) for i in input().split()]
mi = 2*10**5+1
h = 0
if n!=1:
  for i in range (n):
    if mi>m[i]:
      mi=m[i]
      h+=1
    g+=1
  print(h)
else:
  print(n)
Problem p02684 (python)

Fixed submission:
n, k = map(int, input().split())
A = list(map(lambda x: x-1, map(int, input().split())))
isVisit = [False]*n
visits = []
visit = 0
for i in range(n):
    if isVisit[visit]:
        break
    else:
        isVisit[visit] = True
        visits.append(visit)
        visit = A[visit]

if len(visits)>k:
    print(visits[k]+1)
else:
    k -= visits.index(visit)
    visits = visits[visits.index(visit):]
    print(visits[k%len(visits)]+1)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
A = list(map(lambda x: x-1, map(int, input().split())))
isVisit = [False]*n
visits = []
visit = 0
for i in range(n):
    if isVisit[visit]:
        break
    else:
        isVisit[visit] = True
        visits.append(visit)
        visit = A[visit]

if len(visits)>=k:
    print(visits[k]+1)
else:
    k -= visits.index(visit)
    visits = visits[visits.index(visit):]
    print(visits[k%len(visits)]+1)
Problem p02845 (python)

Fixed submission:
n = int(input())
A = list(map(int, input().split()))
mod = 1000000007
ans = 1
cnt = [3 if i==0 else 0 for i in range(n+1)]

for a in A:
    ans = ans*cnt[a]%mod
    if ans==0: break
    cnt[a] -= 1
    cnt[a+1] += 1
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
A = list(map(int, input().split()))
mod = 1000000007
ans = 1
cnt = [3 for i==0 else 0 for i in range(n+1)]

for a in A:
    ans = ans*cnt[a]%mod
    if ans==0: break
    cnt[a] -= 1
    cnt[a+1] += 1
print(ans)
Problem p02882 (python)

Fixed submission:
from math import atan, degrees
a, b, x = map(int, input().split())
if pow(a,2)*b == x:
    print(0)
elif b*pow(a,2)/2 <= x:
    print(90-degrees(atan((a/2)/(b-x/pow(a,2)))))
else:
    print(90-degrees(atan((2*x/(a*b))/b)))

Buggy submission (verdict: Runtime Error):
from math import atan, degrees
a, b, x = map(int, input().split())
if pow(a,b)*b == x:
    print(0)
elif b*pow(a,2)/2 <= x:
    print(90-degrees(atan((a/2)/(b-x/pow(a,2)))))
else:
    print(90-degrees(atan((2*x/(a*b))/b)))

Buggy submission (verdict: Runtime Error):
from math import atan, degrees
a, b, x = map(int, input().split())
if b*pow(a,2)/2 <= x:
    print(90-degrees(atan((a/2)/(b-x/pow(a,2)))))
else:
    print(90-degrees(atan((2*x/(a*b))/b)))
Problem p02909 (python)

Fixed submission:
S = ['Sunny', 'Cloudy', 'Rainy']
today = input()
print(S[(S.index(today)+1)%3])

Buggy submission (verdict: Runtime Error):
S = ['Sunny', 'Cloudy', 'Rainy']
today = input()
prnit(S[(S.index(today)+1)%3])
Problem p02911 (python)

Fixed submission:
N, K, Q = map(int, input().split())
points = [K-Q]*N
for i in range(Q):
    points[int(input())-1] += 1

for p in points:
    print('Yes' if p>0 else 'No')

Buggy submission (verdict: Runtime Error):
n, k, q = map(int, input().split())
A = [k-q]*n
for i in range(q):
    ans = int(input())
    A[ans] += 1
for i in A:
    print('Yes' if i>0 else 'No')
Problem p02947 (python)

Fixed submission:
import sys
from collections import Counter

n, *S = sys.stdin.read().split()
n = int(n)

def main():
    t = [''.join(sorted(t)) for t in S]
    c = Counter(t)
    cnt = 0
    for v in c.values():
        cnt += v*(v-1)
    print(cnt//2)

main()

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

n, *S = sys.stdin.read().split()
n = int(n)

def main():
    t = [''.join(sorted(t)) for t in s]
    c = Counter(t)
    cnt = 0
    for v in c.values():
        cnt += v*(v-1)
    print(cnt//2)

main()
Problem p02953 (python)

Fixed submission:
n = int(input())
H = [int(i) for i in input().split()]

mi = -1
rs = 'Yes'
for i in range(n):
    if mi < H[i]:
        mi = H[i] - 1
    elif mi > H[i]:
        rs = 'No'
        break
print(rs)

Buggy submission (verdict: Runtime Error):
n = int(input())
H = [int(i) for i in input().split()]

mi = -1
for i in range(n):
    if mi < H[i]:
        mi = H[i] - 1
    elif mi > H[i]:
        print('No')
        sys.exit()
print('Yes')
Problem p03006 (python)

Fixed submission:
from collections import Counter
n = int(input())
XY = [list(map(int,input().split())) for _ in range(n)]
dXY = Counter([])
for i in range(n):
    for j in range(n):
        if i!=j:
            dXY += Counter([str(XY[i][0]-XY[j][0])+'_'+str(XY[i][1]-XY[j][1])])
if n==1:
    print(1)
else:
    print(n-dXY.most_common()[0][1])

Buggy submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
XY = [list(map(int,input().split())) for _ in range(n)]
XY.sort(key=lambda x: x[0], reverse=True)
dXY = Counter([])
for i in range(n-1):
    for j in range(i+1,n):
        dXY += Counter([str(XY[i][0]-XY[j][0])+'_'+str(XY[i][1]-XY[j][1])])
print(n-dXY.most_common()[0][1])

Buggy submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
XY = [list(map(int,input().split())) for _ in range(n)]
XY.sort(key=lambda x: x[0], reverse=True)
dXY = Counter([])
for i in range(n-1):
    for j in range(1,n):
        dXY += Counter([str(XY[i][0]-XY[j][0])+'_'+str(XY[i][1]-XY[j][1])])
print(n-dXY.most_common()[0][1])
Problem p03197 (python)

Fixed submission:
import sys
n = int(input())
A = [int(sys.stdin.readline()) for _ in range(n)]
print("second" if all(A[i]%2==0 for i in range(n)) else 'first')

Buggy submission (verdict: Runtime Error):
import sys
n = int(input())
A = [int(sys.stdin.readline()) for _ in range(n)]
print("second" if all(a[i]%2==0 for i in range(n)) else 'first')
Problem p03200 (python)

Fixed submission:
s = input()
r = 0
c = 0
for i in range(len(s)):
    if s[i]=='B':
        c += 1
    else:
        r += c
print(r)

Buggy submission (verdict: Runtime Error):
print(TODO)