Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
#129
H,W=map(int,input().split())
s=[]
c_a=0
for i in range(H):
    s.append(list(input()))

for i in range(H):
    for j in range(W):
        c=0
        
        if s[i][j]!="#":
            c=W+H-1
            if j!=W-1:
                for n in range(1,W-j):
                    if s[i][j+n]=="#":
                        c-=W-j-n
                        break
            if j!=0:
                for n in range(1,j+1):
                    if s[i][j-n]=="#":
                        c-=j-n+1
                        break
            if i!=H-1:
                for m in range(1,H-i):
                    if s[i+m][j]=="#":
                        c-=H-i-m
                        break
            if i!=0:
                for m in range(1,i+1):
                    if s[i-m][j]=="#":
                        c-=i-m+1
                        break
        if c>c_a:
            c_a=c
print(c_a)           


Fixed submission:
import numpy as np
h, w = map(int, input().split())
S = np.array([list(input()) for _ in range(h)]) == "."
U=np.zeros( (h,w),dtype=int )
D=np.zeros( (h,w),dtype=int )
L=np.zeros( (h,w),dtype=int )
R=np.zeros( (h,w),dtype=int )
for i in range(h):
    U[i]=(U[i-1]+1)*S[i]
    D[-i-1]=(D[-i]+1)*S[-i-1]
for j in range(w):
    L[:,j]=(L[:,j-1]+1)*S[:,j]
    R[:,-j-1]=(R[:,-j]+1)*S[:,-j-1]
print(np.max(U+D+R+L)-3)

Buggy python submission (verdict: Time Limit Exceeded):
#129
H,W=map(int,input().split())
s=[]
c_a=0
for i in range(H):
    s.append(list(input()))

for i in range(H):
    for j in range(W):
        c=0
        if s[i][j]!="#":
            c=W+H-1
            if j!=W-1:
                for n in range(1,W-j):
                    if s[i][j+n]=="#":
                        c-=W-j-n
                        break
            if j!=0:
                for n in range(1,j+1):
                    if s[i][j-n]=="#":
                        c-=j-n+1
                        break
            if i!=H-1:
                for m in range(1,H-i):
                    if s[i+m][j]=="#":
                        c-=H-i-m
                        break
            if i!=0:
                for m in range(1,i+1):
                    if s[i-m][j]=="#":
                        c-=i-m+1
                        break
        if c>c_a:
            c_a=c
print(c_a)           

Fixed submission:
import numpy as np
h, w = map(int, input().split())
S = np.array([list(input()) for _ in range(h)]) == "."
U=np.zeros( (h,w),dtype=int )
D=np.zeros( (h,w),dtype=int )
L=np.zeros( (h,w),dtype=int )
R=np.zeros( (h,w),dtype=int )
for i in range(h):
    U[i]=(U[i-1]+1)*S[i]
    D[-i-1]=(D[-i]+1)*S[-i-1]
for j in range(w):
    L[:,j]=(L[:,j-1]+1)*S[:,j]
    R[:,-j-1]=(R[:,-j]+1)*S[:,-j-1]
print(np.max(U+D+R+L)-3)
Buggy python submission (verdict: Runtime Error):
N=int(input())
h=list(map(int,input().split()))
memo=[-1]*(N+1)
def a(j):
    if j==0:
        return 0
    elif j==1:
        return abs(h[1]-h[0])
    else:
        if memo[j]==-1:
            memo[j]=min(a(j-1)+abs(h[j]-h[j-1]),a(j-2)+abs(h[j]-h[j-2]))
        return memo[j]
print(a(N-1))

Fixed submission:
N=int(input())
h=list(map(int,input().split()))
a=[0]*N
for j in range(1,N):
    if j==1:
        a[1]=a[0]+abs(h[1]-h[0])
    else:
        a[j]=min(a[j-1]+abs(h[j]-h[j-1]),a[j-2]+abs(h[j]-h[j-2]))
print(a[-1])

Buggy python submission (verdict: Runtime Error):
N=int(input())
h=list(map(int,input().split()))
memo=[-1]*N
def a(j):
    if j==0:
        return 0
    elif j==1:
        return abs(h[1]-h[0])
    else:
        if memo[j]==-1:
            memo[j]=min(a(j-1)+abs(h[j]-h[j-1]),a(j-2)+abs(h[j]-h[j-2]))
        return memo[j]
print(a(N-1))

Fixed submission:
N=int(input())
h=list(map(int,input().split()))
a=[0]*N
for j in range(1,N):
    if j==1:
        a[1]=a[0]+abs(h[1]-h[0])
    else:
        a[j]=min(a[j-1]+abs(h[j]-h[j-1]),a[j-2]+abs(h[j]-h[j-2]))
print(a[-1])
Buggy python submission (verdict: Runtime Error):
NN=str(input())
print("ABC"+N)

Fixed submission:
N=str(input())
print("ABC"+N)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
a=list(map(int,input().split()))

if max(a)-min(a)>=2:
    print("No")

elif max(a)-min(a)==0:
    count=0
    for i in range(N):
        if a[i]==N-1 or a[i]<=N//2:
            count+=1
    if count==N:
        print("Yes")
    else:
        print("No")
else:
    q=0
    p=0
    for i in range(N):
        if a[i]==max(a):
            q+=1
        elif a[i]==min(a):
            p+=1
    if p+q//2 >= max(a) and max(a)>=p+1:
        print("Yes")
    else:
        print("No")

Fixed submission:
N=int(input())
a=list(map(int,input().split()))
M=max(a)
m=min(a)

if M-m>=2:
    print("No")

elif M-m==0:
    count=0
    for i in range(N):
        if a[i]==N-1 or a[i]<=N//2:
            count+=1
    if count==N:
        print("Yes")
    else:
        print("No")
else:
    q=0
    p=0
    for i in range(N):
        if a[i]==M:
            q+=1
        elif a[i]==m:
            p+=1
    if p+q//2 >= max(a) and max(a)>=p+1:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input(),split())
if a<=c and c<=b:
    print("YES")
else:
    print("NO")

Fixed submission:
a,b,c=map(int,input().split())
if a<=c and c<=b:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input(),split())
if a<=c and c<=b:
  print("YES")
else:
  print("NO")

Fixed submission:
a,b,c=map(int,input().split())
if a<=c and c<=b:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N,x =map(int,input().split())
a=list(map(int,input().split()))
cnt=0
for i in range(N-1):
    if a[i]+a[i+1]>x:
        while a[i+1]>0 and a[i]+a[i+1]>x:
            a[i+1]-=1
            cnt+=1
#端はこの操作では実現できない可能性があるので別に
if a[0]+a[1]>x:
    while a[0]+a[1]>x:
        a[0]-=1
        cnt+=1
if a[-1]+a[-2]>x:
    while a[-1]+a[-2]>x:
        a[-1]-=1
        cnt+=1
print(cnt)

Fixed submission:
N,x =map(int,input().split())
a=list(map(int,input().split()))
cnt=0
for i in range(N-1):
    if a[i]+a[i+1]>x:
        #マイナスになるのを防ぐ
        if a[i+1]<(a[i]+a[i+1]-x):
            cnt+=a[i+1]
            a[i+1]=0
        else:
            cnt+=a[i]+a[i+1]-x
            a[i+1]-=a[i]+a[i+1]-x
#端はこの操作では実現できない可能性があるので別に
if a[0]+a[1]>x:
    cnt+=a[0]+a[1]-x
    a[0]-=a[0]+a[1]-x
if a[-1]+a[-2]>x:
    cnt+=a[-1]+a[-2]-x
    a[-1]-=a[-1]+a[-2]-x
print(cnt)
Buggy python submission (verdict: Runtime Error):
from math import floor,ceil
x = input().split()
a = int(x[0])
b = int(x[1])
c = int(x[2])
print(ceil(ceil(a*c/b)-a*floor(c/b)))


Fixed submission:
k = int(input())
x = input().split()
a = int(x[0])
b = int(x[1])
c = 0
for i in range(a,b+1):
  if i%k==0:
    c = 1
    break
if c==1:
  print("OK")
else:
  print("NG")

Buggy python submission (verdict: Runtime Error):
from math import floor,ceil
x = input().split()
a = int(x[0])
b = int(x[1])
c = int(x[2])
print(int(floor(a*c/b)-a*floor(c/b)))


Fixed submission:
k = int(input())
x = input().split()
a = int(x[0])
b = int(x[1])
c = 0
for i in range(a,b+1):
  if i%k==0:
    c = 1
    break
if c==1:
  print("OK")
else:
  print("NG")

Buggy python submission (verdict: Runtime Error):
from math import floor,ceil
x = input().split()
a = int(x[0])
b = int(x[1])
c = int(x[2])
print(floor(floor(a*c/b)-a*floor(c/b)))


Fixed submission:
k = int(input())
x = input().split()
a = int(x[0])
b = int(x[1])
c = 0
for i in range(a,b+1):
  if i%k==0:
    c = 1
    break
if c==1:
  print("OK")
else:
  print("NG")

Buggy python submission (verdict: Runtime Error):
from math import floor,ceil
x = input().split()
a = int(x[0])
b = int(x[1])
c = int(x[2])
print(int(floor(a*c/b)-a*floor(c/b)))


Fixed submission:
k = int(input())
x = input().split()
a = int(x[0])
b = int(x[1])
c = 0
for i in range(a,b+1):
  if i%k==0:
    c = 1
    break
if c==1:
  print("OK")
else:
  print("NG")
Buggy python submission (verdict: Runtime Error):
from math import log
x = int(input())
x = x/100
return int(log(x)/log(1.01))

Fixed submission:
from math import floor,ceil
x = int(input())
c = 0
p = 100
while p<x:
    p = floor(p*1.01)
    c+=1
print(c)
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
a = int(input())
b,c=map(int,input().split())
while(True):
    for i in range(a, b+1):
        if i//a == 0:
            print('True')
            break
    print('NG')
print('OK')




Fixed submission:
import numpy as np
a = int(input())
b,c=map(int,input().split())
d = np.arange(a,1001,a)
f = np.arange(b,c+1)
d_set=set(d)
f_set=set(f)
#dとfに共通するものを抽出
g_set=d_set&f_set 
#結果をlistに変換
g=list(g_set)
if len(g) == 0:
    print('NG')
else:
    print('OK')

Buggy python submission (verdict: Runtime Error):
a,b,n = map(int, input().split())
#1 <= x <= n
#minimize  int(x/b)
#x = int(a*x/b) - a * int(x/b)

print((a*n)//b)

Fixed submission:
k =int(input())
a,b = map(int, input().split())
c = b//k
 
if b%k==0:
  print("OK")
elif k*c >=a:
  print("OK")
else:
  print("NG")
Buggy python submission (verdict: Runtime Error):
n, k  = map(int, input().split())
x = 0
for k in range(k, n+2):
  a =k * (k-1)//2
  b = k * (2*n+1-k)//2

  x += b- a +1
  
  
  
print(x%(10^9+7))




Fixed submission:
x = int(input())
pi = 3.14159

print(2 * x * pi)
Buggy python submission (verdict: Runtime Error):
x = map(str, input())
a = str[0]
b = str[1]
c = str[2]

if a==7:
  print("Yes")
elif b ==7:
  print("Yes")
elif c == 7:
  print("Yes")
else:
  print("No")

Fixed submission:
x = str(input())
a = x[0]
b = x[1]
c = x[2]

if a=="7":
  print("Yes")
elif b =="7":
  print("Yes")
elif c == "7":
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
x = int(input())
a = int(x/500)
b = x - 500*a
c = int(b/5)

print(1000*a + 5*c)



Fixed submission:
x = list(input())
if (x[2] ==x[3]) and (x[4]==x[5]):
  print("Yes")
else: print("No")
Buggy python submission (verdict: Runtime Error):
x = str(input())
if x =='AAA':
  print(No)
  elif x =='BBB':
    print(No)
    else:
      print(Yes)

Fixed submission:
x = input()
if x =='AAA':
  print('No')
elif x == 'BBB':
  print('No')
else:
  print('Yes')

Buggy python submission (verdict: Runtime Error):
x = input()
if x =='AAA':
  print(No)
  elif x =='BBB':
    print(No)
    else:
      print(Yes)
      

Fixed submission:
x = input()
if x =='AAA':
  print('No')
elif x == 'BBB':
  print('No')
else:
  print('Yes')
Buggy python submission (verdict: Runtime Error):
n = input()

print(n.translate(str.maketrans({"1":"9"}))


Fixed submission:
n = input()

print(n.replace("1","x").replace("9","1").replace("x","9"))

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

print(n.replace("1","9").replace("9","1")
      


Fixed submission:
n = input()

print(n.replace("1","x").replace("9","1").replace("x","9"))

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

print(n.replace("1","9").repace("9","1"))
      


Fixed submission:
n = input()

print(n.replace("1","x").replace("9","1").replace("x","9"))

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

print(n.replace("1","9").repace("9","1")
      


Fixed submission:
n = input()

print(n.replace("1","x").replace("9","1").replace("x","9"))
Buggy python submission (verdict: Runtime Error):
N = int(input())

if N % 2 == 0:
  print(int((N/2)**2))
  
else:
  print(int((N // 2)((N // 2) + 1)))


Fixed submission:
N = int(input())
 
if N % 2 == 0:
  print(int((N/2)**2))
  
else:
  print(int((N // 2)*((N // 2) + 1)))

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

if N % 2 == 0:
  print((N/2)**2)
  
else:
  print((N // 2)((N // 2) + 1))


Fixed submission:
N = int(input())
 
if N % 2 == 0:
  print(int((N/2)**2))
  
else:
  print(int((N // 2)*((N // 2) + 1)))

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

if N % 2 == 0:
  print((N/2)**2)
  
else:
  print( (N // 2)(N // 2 + 1)


Fixed submission:
N = int(input())
 
if N % 2 == 0:
  print(int((N/2)**2))
  
else:
  print(int((N // 2)*((N // 2) + 1)))
Buggy python submission (verdict: Runtime Error):
R = int(input())

if R < 1200:
  pritn("ABC")
  
elif R < 2800:
  print("ARC")
  
else:
  print("AGC")
  
  

Fixed submission:
R = int(input())

if R < 1200:
  print("ABC")
  
elif R < 2800:
  print("ARC")
  
else:
  print("AGC")
Buggy python submission (verdict: Runtime Error):
a, b = map(int,input().split())

print(max(a + b, a - b, a * b)
      
      

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

print(max(a + b, a - b, a * b))
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int,input().split())

if　(a + b) >= c:
  print("Yes")
  
else:
  print("No")


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

if (a + b) >= c:
  print("Yes")
  
else:
  print("No")

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

if　(a + b) >= C:
  print("Yes")
  
else:
  print("No")


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

if (a + b) >= c:
  print("Yes")
  
else:
  print("No")

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

if　(a + b) <= C:
  print("Yes")
  
else:
  print("No")


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

if (a + b) >= c:
  print("Yes")
  
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
A = input()
B = input()
C = input()

print(N[0] + N[1] + N[2])


Fixed submission:
A = input()
B = input()
C = input()

print(A[0] + B[1] + C[2])
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = int(input())

B = N % 500

if B > A:
  print("No')
        
else:
        print("Yes")
        
        

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

B = N % 500

if B > A:
  print("No")
        
else:
        print("Yes")
Buggy python submission (verdict: Runtime Error):
a,b = map(int(input().split()))

print(int(((a + b) // 2)+1))


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

if (a + b) % 2 == 0:
  print(int((a + b)/2))
  
else:
  print(int((a + b) // 2) +1)

Buggy python submission (verdict: Runtime Error):
a,b = int(inout().split())

print(int((a + b) // 2 + 1))


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

if (a + b) % 2 == 0:
  print(int((a + b)/2))
  
else:
  print(int((a + b) // 2) +1)

Buggy python submission (verdict: Runtime Error):
a,b = int(inout().split())

print(int((a + b) / 2))


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

if (a + b) % 2 == 0:
  print(int((a + b)/2))
  
else:
  print(int((a + b) // 2) +1)
Buggy python submission (verdict: Runtime Error):
N = str(input())
li = [N[0], N[1]]

if li in '9':
  print("Yes")
  
else:
  print('N0')
  


Fixed submission:
N = str(input())
li = [N[0], N[1]]

if '9' in li :
  print("Yes")
  
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
x, a, b = map(int,input().split())

if |x - b| > |x - a|:
  print("A")
  
else:
  print("B")
  


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

if abs(x - b) > abs(x - a):
  print("A")
  
else:
  print("B")
Buggy python submission (verdict: Runtime Error):
n, m = int(input().split())

print(int((n - 1) * (m - 1)))



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

print(int((n - 1) * (m - 1)))
Buggy python submission (verdict: Runtime Error):
a,b,c = sort(map(int,input().split()))

print(a+b)

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

print(a+b)
Buggy python submission (verdict: Runtime Error):
A, B, C= input().split().upper()

print(A[0] + B[0] + c[0])


Fixed submission:
A, B, C= input().split()

a = A.upper()
b = B.upper()
c = C.upper()

print(a[0] + b[0] + c[0])
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int,input().split())

d = b - c
e = a - b

if d = e:
  print("Yes")

else:
  print("No")
  

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

d = b - c
e = a - b

if d == e:
  print("YES")

else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
a, b = map(int,input())

if (a + b) < 25:
  print(a + b)

else:
  print((a + b) - 24)
  


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

print((a + b) % 24)

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

if (a + b) < 25:
  print(a + b)

else:
  print(24 - (a + b))
  

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

print((a + b) % 24)
Buggy python submission (verdict: Runtime Error):
a, b = input().split()

if (a = "H" and b = "H") or (a = "D" and b = "D":
    print("H")

elif (a = "H" and b = "D") or (a = "D" and b = "H"):
    print("D")


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

if (a == "H" and b == "H") or (a == "D" and b == "D"):
    print("H")

elif (a == "H" and b == "D") or (a == "D" and b == "H"):
    print("D")
Buggy python submission (verdict: Runtime Error):
a, b = map(int,input().split())

if a == b:
    print("Draw")
elif a == 1 B != 1:
            print("Alice")
elif a != 1 B == 1:
            print("Bob")
elif a < b:
            print("Alice")
else:
            print("Bob")

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

if a == b:
    print("Draw")
elif a == 1 and b != 1:
            print("Alice")
elif a != 1 and b == 1:
            print("Bob")
elif a < b:
            print("Bob")
else:
            print("Alice")

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

if a == b:
    print("Draw")
elif a == 1 B != 1:
            print("Alice")
elif a != 1 B == 1:
            print("Bob")
elif a < b:
            print("Alice")
else:
            print("Bob")
      

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

if a == b:
    print("Draw")
elif a == 1 and b != 1:
            print("Alice")
elif a != 1 and b == 1:
            print("Bob")
elif a < b:
            print("Bob")
else:
            print("Alice")
Buggy python submission (verdict: Runtime Error):
x = int(input())
 
if x < 1200:
  print(ABC)
  
else:
  print(ARC)
  

Fixed submission:
x = int(input())
 
if x < 1200:
  print("ABC")
  
else:
  print("ARC")

Buggy python submission (verdict: Runtime Error):
x = int(input())

if x, 1200:
  print(ABC)
  
else:
  print(ARC)

Fixed submission:
x = int(input())
 
if x < 1200:
  print("ABC")
  
else:
  print("ARC")
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int,input().split())

sum = a + b + c

if sum % 2 == 0:
  print(Yes)

else:
  print(No)
  


Fixed submission:
li = sorted(list(map(int,input().split())))

a = li[0]
b = li[1]
c = li[2]

if a + b == c:
  print('Yes')

else:
  print('No')

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

sum = a + b + c

if sum % 2 = 0:
  print(Yes)

else:
  print(No)
  

Fixed submission:
li = sorted(list(map(int,input().split())))

a = li[0]
b = li[1]
c = li[2]

if a + b == c:
  print('Yes')

else:
  print('No')
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int,input().split())

if a == 5 and b == 5 and c == 7:
  print(YES)

elif a == 5 and b == 7 and c == 5:
  print(YES)

elif a == 7 and b == 5 and c == 5:
  print(YES)

else:
  print(NO)
  

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

if a == 5 and b == 5 and c == 7:
  print('YES')

elif a == 5 and b == 7 and c == 5:
  print('YES')

elif a == 7 and b == 5 and c == 5:
  print('YES')

else:
  print('NO')
Buggy python submission (verdict: Runtime Error):
x, y, a, b, c = map(int, input().split())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))

p.sort(reverse=True)
q.sort(reverse=True)
r.sort(reverse=True)

l = p[:x] + q[:y]
l.sort()

i = 0
while l[i] < r[i] and i < len(l) and i < len(r):
    l[i] = r[i]
    i += 1

print(sum(l))

Fixed submission:
x, y, a, b, c = map(int, input().split())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))

p.sort(reverse=True)
q.sort(reverse=True)
r.sort(reverse=True)

l = p[:x] + q[:y]
l.sort()

i = 0
while i < len(l) and i < len(r):
  if l[i] < r[i]:
    l[i] = r[i]
    i += 1
  else:
    break

print(sum(l))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()
tmp = set()
si = set()
for i in range(n-2):
  if i in si:
    continue
  else:
    si.add(i)
    sj = set()
    for j in range(i+1,n-1):
      if j in sj:
        continue
      else:
        sj.add(j)
        sk = set()
        for k in range(j+1, n):
          if k in sk:
            continue
          else:
            sk.add(k)
       	    tmp.add(s[i] + s[j] + s[k])
print(len(tmp))

Fixed submission:
n = int(input())
s = input()
tmp = set()
si = set()
for i in range(n-2):
  if s[i] in si:
    continue
  else:
    si.add(s[i])
    sj = set()
    for j in range(i+1,n-1):
      if s[j] in sj:
        continue
      else:
        sj.add(s[j])
        sk = set()
        for k in range(j+1, n):
          if k in sk:
            continue
          else:
            sk.add(s[k])
       	    tmp.add(s[i] + s[j] + s[k])
print(len(tmp))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()
tmp = set()
for i in range(n-2):
  for j in range(i+1,n-1):
    for k in range(j+1, n):
      tmp.add(s[i] + s[j] + s[k])
print(len(tmp))

Fixed submission:
n = int(input())
s = input()
tmp = set()
si = set()
for i in range(n-2):
  if s[i] in si:
    continue
  else:
    si.add(s[i])
    sj = set()
    for j in range(i+1,n-1):
      if s[j] in sj:
        continue
      else:
        sj.add(s[j])
        sk = set()
        for k in range(j+1, n):
          if k in sk:
            continue
          else:
            sk.add(s[k])
       	    tmp.add(s[i] + s[j] + s[k])
print(len(tmp))
Buggy python submission (verdict: Runtime Error):
a,b = map(int, input(9.split()))
if 0 < a < 10 and 0 < b < 10:
  print(a * b)
else:
  print(-1)

Fixed submission:
a,b = map(int, input().split())
if 0 < a < 10 and 0 < b < 10:
  print(a * b)
else:
  print(-1)
Buggy python submission (verdict: Runtime Error):
a, b, x = map(int,input().split())
s = x/a
import math
if (a*b / 2 >= s):
  h = 2*s/b
  rad = math.atan(h/b)
  print(90.0 - math.degrees(rad))
else:
  l = 2*(b - s/a)
  rad = math.atan(a/l)
  print(90.0 - math.degrees(rad))

Fixed submission:
a, b, x = map(int,input().split())
s = x/a
import math
if s == a * b:
  print(0)
elif (a*b / 2 >= s):
  h = 2*s/b
  rad = math.atan(h/b)
  print(90.0 - math.degrees(rad))
else:
  l = 2*(b - s/a)
  rad = math.atan(a/l)
  print(90.0 - math.degrees(rad))

Buggy python submission (verdict: Runtime Error):
a, b, x = map(int,input().split())
s = x/a
import math
if (a*b / 2 >= s):
  h = 2*s/b
  rad = math.atan(h/b)
  print(90.0 - math.degrees(rad))
else:
  rest = a*b - s
  l = 2*rest/a
  rad = math.atan(a/l)
  print(90.0 - math.degrees(rad))

Fixed submission:
a, b, x = map(int,input().split())
s = x/a
import math
if s == a * b:
  print(0)
elif (a*b / 2 >= s):
  h = 2*s/b
  rad = math.atan(h/b)
  print(90.0 - math.degrees(rad))
else:
  l = 2*(b - s/a)
  rad = math.atan(a/l)
  print(90.0 - math.degrees(rad))

Buggy python submission (verdict: Runtime Error):
a, b, x = map(int,input().split())
s = x/a
import math
if (a*b / 2 >= s):
  h = 2*s/b
  rad = math.atan(h/b)
  print(90.0 - math.degrees(rad))
else:
  rest = a*b - s
  l = 2*rest/a
  rad = math.atan(a/l)
  print(90.0 - math.degrees(rad))

Fixed submission:
a, b, x = map(int,input().split())
s = x/a
import math
if s == a * b:
  print(0)
elif (a*b / 2 >= s):
  h = 2*s/b
  rad = math.atan(h/b)
  print(90.0 - math.degrees(rad))
else:
  l = 2*(b - s/a)
  rad = math.atan(a/l)
  print(90.0 - math.degrees(rad))
Buggy python submission (verdict: Runtime Error):
a, b = map(int,input().split())
ans = 0
while ((a-1)*ans < b):
  ans++
print(ans)

Fixed submission:
a, b = map(int,input().split())
ans = 0
plug = 1
while (plug < b):
  plug += a-1
  ans += 1
print(ans)