Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
def main():
    a, b = map(int, input().split())
    x = 13
    while x <= int(a/0.08):
        x+=1
        if int(x*0.08) == a:
            if int(x*0.1) == b:
                return x
    return -1



if __name__ == "__main__":
    print(main()

Fixed submission:
import math
def main():
    a, b = map(int, input().split())
    ra = [math.ceil(i/0.08) for i in range(1, 102)]
    rb = [math.ceil(i/0.1) for i in range(1, 102)]
    x = ra[a-1] 
    while x < ra[a] :
        if int(x*0.1) == b:
            return x
        x+=1
    return -1



if __name__ == "__main__":
    print(main())
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n = int(input())
    a = list(map(int, input().split()))
    tmp = []
    is_unique = True
    for i in range(n):
        for j in tmp:
            if j == a[i]:
                is_unique = False
                break
        if not is_unique:
            break
        tmp.append(a[i])
    
    if is_unique:
        print("YES")
    else:
        print("NO")


if __name__=="__main__":
    main()


Fixed submission:
def main():
    n = int(input())
    a = list(map(int, input().split()))
    tmp = {}
    is_unique = True
    for i in range(n):
        if a[i] in tmp:
            is_unique = False
            break
        tmp[a[i]] = a[i]
    
    if is_unique:
        print("YES")
    else:
        print("NO")


if __name__=="__main__":
    main()
Buggy python submission (verdict: Runtime Error):
import numpy as np

def main():
    n, k = map(int, input().split())
    p = list(map(int, input().split()))
    # list of expected value
    e = [(p[j-1]+1)/2.for j in range(1, n+1)]
    # cumulative sum for e
    c_s = np.cumsum(e)
    # sum of range k
    s = c_s[k:] - c_s[:n-k]
    # calculate max of s
    ans = max(s)

    print(ans)

if __name__ == "__main__":
    main()

Fixed submission:
def main():
    n, k = map(int, input().split())
    p = list(map(int, input().split()))
    e = [(p[j-1]+1)/2.for j in range(1, n+1)]
    s = [sum(e[:k])]
    for i in range(1, n-k+1):
        s.append(s[-1]-e[i-1]+e[k+i-1])
    ans = max(s)
    print(ans)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

def main():
    n, k = map(int, input().split())
    p = np.array(list(map(int, input().split())))
    e = np.array([(k + (p[j-1:j+k-1].sum())) / 2. for j in range(1, n-k+2)])
    ans = e.max()
    print(ans)

if __name__ == "__main__":
    main()

Fixed submission:
def main():
    n, k = map(int, input().split())
    p = list(map(int, input().split()))
    e = [(p[j-1]+1)/2.for j in range(1, n+1)]
    s = [sum(e[:k])]
    for i in range(1, n-k+1):
        s.append(s[-1]-e[i-1]+e[k+i-1])
    ans = max(s)
    print(ans)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n, k = map(int, input().split())
    p = list(map(int, input().split()))
    e = []
    for j in range(1, n-k+2):
        e.append((k + (sum(p[j-1:j+k-1]))) / 2.)
    ans = max(e)
    print(ans)

if __name__ == "__main__":
    main()

Fixed submission:
def main():
    n, k = map(int, input().split())
    p = list(map(int, input().split()))
    e = [(p[j-1]+1)/2.for j in range(1, n+1)]
    s = [sum(e[:k])]
    for i in range(1, n-k+1):
        s.append(s[-1]-e[i-1]+e[k+i-1])
    ans = max(s)
    print(ans)

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    N, K = map(int, input().split())
    h = [int(x) for x in input().split()]
    # memo = [None for i in range(N)]

    # def rec(n):
    #     if memo[n-1] == None:
    #         if n <= 1:
    #             memo[n-1] = 0
    #         elif n == 2:
    #             memo[n-1] = abs(h[0]-h[1])
    #         else:
    #             memo[n-1] = min(abs(h[n-1]-h[j-1]) + rec(j) for j in range(max(0,n-K),n))
    #     return memo[n-1]

    # print(rec(N))

    dp = [-1]*N
    dp[0] = 0
    dp[1] = abs(h[1]-h[0])

    for i in range(2,N):
        dp[i] = min(abs(h[i]-h[j]) + dp[j] for j in range(max(0,i-K),i))
    print(dp[N-1])

if __name__ == "__main__":
    main()

Fixed submission:
def main():
    N, K = map(int, input().split())
    h = [int(x) for x in input().split()]
    # memo = [None for i in range(N)]

    # def rec(n):
    #     if memo[n-1] == None:
    #         if n <= 1:
    #             memo[n-1] = 0
    #         elif n == 2:
    #             memo[n-1] = abs(h[0]-h[1])
    #         else:
    #             memo[n-1] = min(abs(h[n-1]-h[j-1]) + rec(j) for j in range(max(0,n-K),n))
    #     return memo[n-1]

    # print(rec(N))

    dp = [-1]*N
    dp[0] = 0
    dp[1] = abs(h[1]-h[0])

    for i in range(2,N):
        dp[i] = min(abs(h[i]-h[j]) + dp[j] for j in range(max(0,i-K),i))
    print(dp[N-1])

# if __name__ == "__main__":
main()

Buggy python submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10**5)

def main():
    N, K = map(int, input().split())
    h = [int(x) for x in input().split()]
    memo = [None for i in range(N)]

    def rec(n):
        if memo[n-1] == None:
            if n <= 1:
                memo[n-1] = 0
            elif n == 2:
                memo[n-1] = abs(h[0]-h[1])
            else:
                memo[n-1] = min(abs(h[n-1]-h[j-1]) + rec(j) for j in range(max(0,n-K),n))
        return memo[n-1]

    print(rec(N))

if __name__ == "__main__":
    main()

Fixed submission:
def main():
    N, K = map(int, input().split())
    h = [int(x) for x in input().split()]
    # memo = [None for i in range(N)]

    # def rec(n):
    #     if memo[n-1] == None:
    #         if n <= 1:
    #             memo[n-1] = 0
    #         elif n == 2:
    #             memo[n-1] = abs(h[0]-h[1])
    #         else:
    #             memo[n-1] = min(abs(h[n-1]-h[j-1]) + rec(j) for j in range(max(0,n-K),n))
    #     return memo[n-1]

    # print(rec(N))

    dp = [-1]*N
    dp[0] = 0
    dp[1] = abs(h[1]-h[0])

    for i in range(2,N):
        dp[i] = min(abs(h[i]-h[j]) + dp[j] for j in range(max(0,i-K),i))
    print(dp[N-1])

# if __name__ == "__main__":
main()
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

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

if (a % 2 == 0) | (b % 2 == 0) :
    print("Even)
else:
    print("Odd")

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

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

if (a % 2 == 0) | (b % 2 == 0) :
    print("Even")
else:
    print("Odd")
Buggy python submission (verdict: Runtime Error):
a = str(input())

count = 0

for s in a:
  if int(s) == 1:
    count++
print(count)

Fixed submission:
a = str(input())

count = 0

for s in a:
  if int(s) == 1:
    count+=1
print(count)
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
H = [int(i) for i in input().split()]
A = []
B = []
count = 0
for i in range(M):
    a,b = map(int,input().split())
    A.append(a)
    B.append(b)
#ない場合
for i in range(1,N+1):
    if (not i in A) and (not i in B):
        count +=1
    
    for k in range(M):
        if i == A[k]:
            if H[i-1] >H[B[k]-1]:
                result = 1
            else:
                result = 0
                break
        if i ==B[k]:
            if H[i-1] >H[A[k]-1]:
                result = 1
            else:
                result = 0
                break
    if result == 1:
        count += 1
print(count)

Fixed submission:
N,M = map(int,input().split())
H = [int(i) for i in input().split()]
nlst = [1 for i in range(N)]
for i in range(M):
    a,b =map(int,input().split())
    c = min(H[a-1],H[b-1])
    if c == H[a-1]:
        nlst[a-1] = 0
    if c == H[b-1]:
        nlst[b-1] = 0
print(sum(nlst))
Buggy python submission (verdict: Time Limit Exceeded):
def kitaiti(number):
    count = 0
    for i in range(1,number + 1):
        count += (i / number)
    return count
def dp(mylist,K,N):
    i = 0
    count = sum(mylist[i:K + i])
    while K + i < N:
        i += 1
        if count < sum(mylist[i:K + i]):
            count = sum(mylist[i:K + i])
    return count
N,K = (int(i) for i in input().split())
p = [int(x) for x in input().split()]

kitaiti = [kitaiti(x) for x in p]

print(dp(kitaiti,K,N))

Fixed submission:
def kitaiti(number):
 return (1 + number)/2
def ruisekiwa(mylist):
    s = [0]
    t = 0
    for i in range(len(mylist)):
        t += mylist[i]
        s.append(t)
    return s
def wa(mylist,K):
    a = []
    i = 0
    while K + i < len(mylist):
        a.append(mylist[K + i]-mylist[i])
        i += 1
    return max(a)
N,K = (int(i) for i in input().split())
kitaiti = [kitaiti(int(x)) for x in input().split()]
print(wa(ruisekiwa(kitaiti),K))
Buggy python submission (verdict: Runtime Error):
N,A,B=map(int,input.split())
print(min(N*A,B))

Fixed submission:
N,A,B=map(int,input().split())
print(min(N*A,B))
Buggy python submission (verdict: Runtime Error):
S, T = input().split())
A, B = map(int,input().split())
U = input()
if S == U:
  print(A - 1, B)
else:
  print(A, B - 1)

Fixed submission:
S, T = input().split()
A, B = map(int,input().split())
U = input()
if S == U:
  print(A - 1, B)
else:
  print(A, B - 1)
Buggy python submission (verdict: Runtime Error):
N = int(input().strip())
grid = []
for i in range(N):
    array = list(map(int, input().strip().split()))
    grid.append(array)
list_N = list(range(1,N+1))
grid.sort()
a = 0
count = 0
for j in range(N) :
  list_a = list(range(grid[j][0]-grid[j][1]+1, grid[j][0]+grid[j][1]-1))
  list_b = list(set(list_a) - set(list_N))
  if list_b == []:
    list_N = list(set(list_N) - set(list_a))
    count += 0
  else:
    count += 1
print(N - count)

Fixed submission:
h = int(input())
w = int(input())
n = int(input())
a = max(h,w)
b = a
count = 0
if h*w == n:
  print(h)
elif b >= n:
  print(1)
else:
 while b*count < n:
   count += 1
 print(count)

Buggy python submission (verdict: Runtime Error):
N = int(input().strip())
grid = []
for i in range(N):
    array = list(map(int, input().strip().split()))
    grid.append(array)
list_N = list(range(1,N+1))
grid.sort()
a = 0
count = 0
for j in range(N) :
  list_a = list(range(grid[j][0]-grid[j][1]+1, grid[j][0]+grid[j][1]-1))
  list_b = list(set(list_a) - set(list_N))
  if list_b == []:
    list_N = list(set(list_N) - set(list_a))
    count += 0
  else:
    count += 1
print(count)

Fixed submission:
h = int(input())
w = int(input())
n = int(input())
a = max(h,w)
b = a
count = 0
if h*w == n:
  print(h)
elif b >= n:
  print(1)
else:
 while b*count < n:
   count += 1
 print(count)

Buggy python submission (verdict: Runtime Error):
N = int(input().strip())
grid = []
for i in range(N):
    array = list(map(int, input().strip().split()))
    grid.append(array)
list_N = list(range(1,N+1))
grid.sort()
a = 0
count = 0
for i in range(N) :
  list_a = list(range(grid[i][0]-grid[i][1]+1, grid[i][0]+grid[i][1]-1))
  list_b = list(set(list_a) - set(list_N))
  if list_b == []:
    list_N = list(set(list_N) - set(list_a))
    count += 0
  else:
    count += 1
print(count)

Fixed submission:
h = int(input())
w = int(input())
n = int(input())
a = max(h,w)
b = a
count = 0
if h*w == n:
  print(h)
elif b >= n:
  print(1)
else:
 while b*count < n:
   count += 1
 print(count)
Buggy python submission (verdict: Runtime Error):
n, k, m = map(int, input().split())
a = list(map(int, input().split()))
count = 0
total_score = 0
while count <= n - 2:
  total_score += a[count]
  count += 1 
last_score = n * m - total_score
if last_score < 0:
  print(0) 
else:
  print(last_score)

Fixed submission:
c = input()
alp = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
count1 = 0
count2 = 0
while count2 <= 26:
  if alp[count1] == c:
     count1 += 1
     count2 += 27
  else:
    count1 += 1
    count2 += 1
print(alp[count1])
Buggy python submission (verdict: Runtime Error):
a, b = map(int,input().split())
def gcd(a,b):
    x = max(a,b)
    y = min(a,b)
    while x // y != 0:
        z = x // y
        y = z
        return z
print(int(a * b / gcd(a,b)))

Fixed submission:
a = int(input())
b = int(input())
if a == 1 and b == 2 or a == 2 and b == 1:
  print("3")
elif a == 1 and b == 3 or a == 3 and b ==1:
  print("2")
else:
  print("1")
Buggy python submission (verdict: Runtime Error):
#coding:utf-8
A,B = map(int,input(),split())
if  A >= 13:
    print(B)
elif 6 <= A <= 12:
    print(B / 2)
print(0)

Fixed submission:
#coding:utf-8
A,B = map(int,input().split())
if  A >= 13:
    print(B)
elif 6 <= A and A <= 12:
    print(int(B / 2))
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
#coding:utf-8
a,b,t = input().split()
x = t // a
print(b*x)


Fixed submission:
#coding:utf-8
a,b,t =map(int,input().split())
x = t // a
print(b*x)

Buggy python submission (verdict: Runtime Error):
x,y,z= input().split()

A =( z + 0.5) / x

print( A * y)

Fixed submission:
#coding:utf-8
a,b,t =map(int,input().split())
x = t // a
print(b*x)

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

Y =( X[3] + 0.5) / X[1]

print( Y * X[2])

Fixed submission:
#coding:utf-8
a,b,t =map(int,input().split())
x = t // a
print(b*x)
Buggy python submission (verdict: Runtime Error):
#coding: utf-8

a = input()

print((24 - a) + 24)

Fixed submission:
#coding: utf-8

a = int(input())

print(24 - a + 24)

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

a = input()

print(24 - a + 24)

Fixed submission:
#coding: utf-8

a = int(input())

print(24 - a + 24)

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

print(24 - M + 24)

Fixed submission:
#coding: utf-8

a = int(input())

print(24 - a + 24)

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

print(23 - M + 24)

Fixed submission:
#coding: utf-8

a = int(input())

print(24 - a + 24)
Buggy python submission (verdict: Runtime Error):
import copy
def dfs(x,y,z,grid,H,W):
    if(x-1>=0):
        if(grid[y][x-1]>z or grid[y][x-1]==0):
            grid[y][x-1]=z+1
            dfs(x-1,y,z+1,grid,H,W)
    if(x+1<W):
        if(grid[y][x+1]>z or grid[y][x+1]==0):
            grid[y][x+1]=z+1
            dfs(x+1,y,z+1,grid,H,W)
    if(y-1>=0):
        if(grid[y-1][x]>z or grid[y-1][x]==0):
            grid[y-1][x]=z+1
            dfs(x,y-1,z+1,grid,H,W)
    if(y+1<H):
        if(grid[y+1][x]>z or grid[y+1][x]==0):
            grid[y+1][x]=z+1
            dfs(x,y+1,z+1,grid,H,W)
    return 0


H,W=map(int,input().split())
grid=[]
tmp=[]
for i in range(H):
    S=str(input())
    tmp=[]
    for j in range(W):
        if(S[j]=="."):
            tmp.append(0)
        else:
            tmp.append(-1)
    grid.append(tmp)
ans=0
result=0
for i in range(W):
    for j in range(H):
        if(grid[j][i]==0):
            if(j-1>=0 and j+1<H and i-1>=0 and i+1<W):
                if(grid[j-1][i]+grid[j+1][i]+grid[j][i-1]+grod[i+1]<(-1)):
                        dataset=copy.deepcopy(grid)
                        dfs(i,j,1,dataset,H,W)
                        ans=max(dataset)
                        ans=max(ans)
                        result=max(result,ans)
            else:
                dataset=copy.deepcopy(grid)
                dfs(i,j,1,dataset,H,W)
                ans=max(dataset)
                ans=max(ans)
                result=max(result,ans)
print(result-1)

Fixed submission:
import copy
from collections import deque

#反省bfsだと計算量が多くなってしまうパターンだった。bfsが正解。
def dfs(x,y,z,grid,H,W):
    if(x-1>=0):
        if(grid[y][x-1]>z or grid[y][x-1]==0):
            grid[y][x-1]=z+1
            dfs(x-1,y,z+1,grid,H,W)
    if(x+1<W):
        if(grid[y][x+1]>z or grid[y][x+1]==0):
            grid[y][x+1]=z+1
            dfs(x+1,y,z+1,grid,H,W)
    if(y-1>=0):
        if(grid[y-1][x]>z or grid[y-1][x]==0):
            grid[y-1][x]=z+1
            dfs(x,y-1,z+1,grid,H,W)
    if(y+1<H):
        if(grid[y+1][x]>z or grid[y+1][x]==0):
            grid[y+1][x]=z+1
            dfs(x,y+1,z+1,grid,H,W)
    return 0
    
dx = [1, 0, -1, 0]
dy = [0, 1, 0, -1]

def bfs(x,y,grid,H,W):
    dist=[[0 for _ in range(W)] for _ in range(H)]
    que=deque()
    que.append((y,x))
    dist[y][x]=1
    while(len(que)>0):
        y,x=que.popleft()
        for i in range(4):
            nx=x+dx[i]
            ny=y+dy[i]
            if(0 <= nx < W) and (0 <= ny < H) and grid[ny][nx]==0 and dist[ny][nx] == 0:
                que.append((ny,nx))
                dist[ny][nx]=dist[y][x]+1
    return( max([max(dist[i]) for i in range(H)]))
    
H,W=map(int,input().split())
grid=[]
tmp=[]
for i in range(H):
    S=str(input())
    tmp=[]
    for j in range(W):
        if(S[j]=="."):
            tmp.append(0)
        else:
            tmp.append(-1)
    grid.append(tmp)
ans=0
result=0
for i in range(W):
    for j in range(H):
        if(grid[j][i]==0):
                ans=bfs(i,j,grid,H,W)
                result=max(result,ans)
print(result-1)
Buggy python submission (verdict: Runtime Error):
s = intput()
if(s[1]=='B'): print('ARC')
else: print('ABC')

Fixed submission:
s = input()
if(s[1]=='B'): print('ARC')
else: print('ABC')
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int, input())

print(c,a,b)

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

print(c,a,b)

Buggy python submission (verdict: Runtime Error):

a,b,c=map(int, input())
print(c,a,b)

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

print(c,a,b)
Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
 
a = [ int(x) for x in input().split()]
limit = sum(a)//(4*m)
 
count=0
for x in a:
  	if(x>=limit):
      	count+=1
if(count<m):
  	print('No')
else:
  	print('Yes')



Fixed submission:
n,m = map(int,input().split())
 
a = [ int(x) for x in input().split()]
limit = sum(a)/(4*m)
 
count=0
for x in a:
  	if(x>=limit):
      			count+=1
if(count<m):
  	print('No')
else:
  	print('Yes')

Buggy python submission (verdict: Runtime Error):
sfhgfh

Fixed submission:
n,m = map(int,input().split())
 
a = [ int(x) for x in input().split()]
limit = sum(a)/(4*m)
 
count=0
for x in a:
  	if(x>=limit):
      			count+=1
if(count<m):
  	print('No')
else:
  	print('Yes')
Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter

n = int(input())
a = input().split()

for k in range(n):  
    freq = Counter(a)
    freq[a[k]]-=1
    total = 0
  
    for key,val in freq.items():
        if( val>1):
            total+= (val*(val-1))//2
        
    print(total)

Fixed submission:
from collections import Counter

n = int(input())
a = input().split()
freq = Counter(a)
#print(freq)
total=0
    
for key,val in freq.items():
    total+=(val*(val-1))//2

for k in range(n): 

    kth = (freq[a[k]]*(freq[a[k]]-1))//2
    newkth = ((freq[a[k]]-2)*(freq[a[k]]-1))//2  

    total -= kth
    total += newkth
    
    print(total)
    
    total -=newkth
    total +=kth

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter

n = int(input())
a = input().split()
add=''
for k in range(n):
    if(add!=''):
        a.insert(k-1,add)
    add=a.pop(k)
  
    freq = Counter(a)
    total = 0
  
    for key,val in freq.items():
        if( val>1):
            total+= (val*(val-1))//2
        
    print(total)

Fixed submission:
from collections import Counter

n = int(input())
a = input().split()
freq = Counter(a)
#print(freq)
total=0
    
for key,val in freq.items():
    total+=(val*(val-1))//2

for k in range(n): 

    kth = (freq[a[k]]*(freq[a[k]]-1))//2
    newkth = ((freq[a[k]]-2)*(freq[a[k]]-1))//2  

    total -= kth
    total += newkth
    
    print(total)
    
    total -=newkth
    total +=kth
Buggy python submission (verdict: Runtime Error):
import math
x = math.pi
a=input()
n = int(a)
print(2＊n*x)

Fixed submission:
import math
x = math.pi
a=input()
n = int(a)
print(2*n*x)
Buggy python submission (verdict: Runtime Error):
n=input()
a=list(map(int,input().split()))
h = a[0]
count = 0
for i in len(a):
    if h <= a[i]:
        count =+ 1
print(count)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
h = a[0]
count = 0
for i in range(n):
    if h <= a[i]:
        h = a[i]
        count = count + 1
print(count)
Buggy python submission (verdict: Runtime Error):
S=input()
if S=="ABC":
  print("ARC")
if S=="ARC"
  print("ABC")

Fixed submission:
S=input()
if S=="ABC":
  print("ARC")
else:
  print("ABC")
Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())
A = list(map(int, input().split()))

x = [0] * M
y = [0] * M
T = [0] * N
for i in range(M):
    x[i], y[i] = map(int, input().split())

for i in range(M):
    MAX=max(A[x[i]-1],A[y[i]-1])
    if MAX==A[x[i]-1]:
        T[x[i]-1]+=1
        T[y[i]-1]=-1
    else:
        T[y[i]-1]+=1
        T[x[i]-1]=-1
    for j in range(M):
            MIN=min(A[x[j]-1],A[y[j]-1])
            if MAX==MIN:
                if MAX==A[x[i]-1]:
                    T[x[i]-1]=-1
                else:
                    T[y[i]-1]=-1

sum=0
for i in range(N):
    if T[i]>=0:
        sum+=1

print(sum)


Fixed submission:
N,M = map(int,input().split())
H = list(map(int,input().split()))
notwinner = []
for i in range(M):
    ab = list(map(int,input().split()))
    if H[ab[0]-1] > H[ab[1]-1]:
        notwinner.append(ab[1])
    elif H[ab[0]-1] < H[ab[1]-1]:
        notwinner.append(ab[0])
    else:
        notwinner.append(ab[0])
        notwinner.append(ab[1])
wtou = N - len(set(notwinner))#set()で重複する要素を含まない要素にしてlenで数える
print(wtou)
Buggy python submission (verdict: Time Limit Exceeded):
A, B, N= map(int, input().split())
max=0

for i in range(N):
    x=i+1
    a=(A*x)//B
    b=x//B
    f=a-A*b
    if max<f:
        max=f
print(max)


Fixed submission:
A,B,N=map(int,input().split())
if N+1>=B:
    T=int(A*(B-1)/B)
    print(T)
else:
    T=int(A*N/B)
    print(T)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
A, B, N= map(int, input().split())
max=0

for i in range(N):
    x=i+1
    a=(A*x)//B
    b=x//B
    f=a-A*b
    if max<f:
        max=f
print(max)


Fixed submission:
A,B,N=map(int,input().split())
if N+1>=B:
    T=int(A*(B-1)/B)
    print(T)
else:
    T=int(A*N/B)
    print(T)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
A, B, N= map(int, input().split())
max=0

for i in range(N):
    x=i+1
    f=np.math.floor(A*x/B)-A*np.math.floor(x/B)
    if max<f:
        max=f
print(max)


Fixed submission:
A,B,N=map(int,input().split())
if N+1>=B:
    T=int(A*(B-1)/B)
    print(T)
else:
    T=int(A*N/B)
    print(T)
Buggy python submission (verdict: Runtime Error):
N,M= int(input())
A = list(map(int, input().split()))
sum=0
for i in range(M):
    sum+=A[i]
if N-sum<0:
    print(-1)
else:
    print(N-sum)


Fixed submission:
N, M = map(int, input().split())
A = list(map(int, input().split()))
sum=0
for i in range(M):
    sum+=A[i]
if N-sum<0:
    print(-1)
else:
    print(N-sum)

Buggy python submission (verdict: Runtime Error):
N,M= int(input())
A = list(map(int, input().split()))
sum=0
for i in range(M)
    sum+=A[i]
if N-sum<0:    
    print(-1)
else:
    print(N-sum)    


Fixed submission:
N, M = map(int, input().split())
A = list(map(int, input().split()))
sum=0
for i in range(M):
    sum+=A[i]
if N-sum<0:
    print(-1)
else:
    print(N-sum)
Buggy python submission (verdict: Runtime Error):
import re
seven = re.pattern("7")
print("Yes") if seven.match(input()) else "No"

Fixed submission:
str = input()
print("Yes") if '7' in str else print("No")