ZhenlongDai/ACPR huggingface dataset:
Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
p=[0]*5
for i in range(5):
    p[i]=int(input())
p.sort()
ans=5+(n-n%p[0])/p[0]
print(ans)

Failing test case input:
10
123
1521
27
9
45

Expected output:
6


Actual output:
6.0


Fixed submission (verdict: Accepted):
n=int(input())
p=[0]*5
for i in range(5):
    p[i]=int(input())
p.sort()
if n%p[0]!=0:
    ans=5+(n-n%p[0])/p[0]
else:
    ans=4+n/p[0]
print(int(ans))

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
L = [int(input()) for i in range(5)]
ans = n 
print(ans)


Failing test case input:
10
50
4476
46
11
69

Expected output:
5


Actual output:
10


Fixed submission (verdict: Accepted):
n = int(input())
L = [int(input()) for i in range(5)]
ans = -(-n 
print(ans)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
l = [0] * 6
l[0] = N
m = [int(input()) for i in range(5)]

ans = N

print(ans)

Failing test case input:
10000000007
2
3
1
6
11

Expected output:
10000000011


Actual output:
10000000007


Fixed submission (verdict: Accepted):
from math import ceil
N = int(input())
l = [0] * 6
l[0] = N
m = [int(input()) for i in range(5)]
ans = ceil(N/min(m)) + 4
print(ans)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
list = list(int(input())for i in range(5))
ans = N
if min(list) < N:
    ans = 5
print(ans)

Failing test case input:
10
123
811
2
9
123

Expected output:
9


Actual output:
5


Fixed submission (verdict: Accepted):
import math
N = int(input())
list = list(int(input())for i in range(5))
a = min(list)
ans = math.ceil(N/a)+4
print(ans)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

p = [a, b, c, d, e]
n

Failing test case input:
10
104
1017
2
9
38

Expected output:
9


Actual output:

Fixed submission (verdict: Accepted):
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

p = [a, b, c, d, e]
if n%min(p) != 0:
    print(n
else:
    print(n

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A_E = [int(_) for _ in input().split()]
A_E.sort()
time = N/A_E[0]
if N % A_E[0]:
    time += 1
time += 4
print(time)


Failing test case input:
10
123
2070
33
11
36

Expected output:
5


Actual output:
5.08130081300813


Fixed submission (verdict: Accepted):
N = int(input())
A_E = [int(input()) for i in range(5)]
A_E.sort()
time = int(N/A_E[0])
if N % A_E[0]:
    time += 1
time += 4
print(time)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
a=[]
for i in range(5):
  a.append(int(input()))
 
time = int(N/min(a))+5
print(time)

Failing test case input:
10
123
633
2
9
123

Expected output:
9


Actual output:
10


Fixed submission (verdict: Accepted):
N = int(input())
import math
a=[]
for i in range(5):
  a.append(int(input()))
 
time = math.ceil(N/min(a))+4
print(time)
Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
a=[int(input()) for _ in range(6)]
flag=a.index(min(a))
ans=5-flag
for i in range(flag):
    ans+=math.ceil(a[i]/a[i+1])
print(ans)

Failing test case input:
10
104
1017
2
9
38

Expected output:
9


Actual output:
513


Fixed submission (verdict: Accepted):
import math
a=[int(input()) for _ in range(6)]
flag=a.index(min(a))
ans=4+math.ceil(a[0]/min(a))
print(ans)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

N=int(input().strip())
a=[0]*5
ans=0
for i in range(5):
    a[i]=int(input().strip())
b=a.index(min(a))
ans=5+math.floor(N/a[b])
print(ans)

Failing test case input:
5
3
2
4
1
6

Expected output:
9


Actual output:
10


Fixed submission (verdict: Accepted):
import math

N=int(input().strip())
a=[0]*5
ans=0
for i in range(5):
    a[i]=int(input().strip())

ans=4+math.ceil(N/min(a))
print(ans)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())

mini=min(A,B,C,D,E)

print(mini+5)

Failing test case input:
10000000007
2
3
5
7
6

Expected output:
5000000008


Actual output:
7


Fixed submission (verdict: Accepted):
import math

N=int(input())
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())

mini=math.ceil(N/min(A,B,C,D,E))

print(mini+4)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
a=[]
for i in range(5):
    a.append(int(input()))
a_min = min(a)
print(5+ int(N/a_min))

Failing test case input:
10
31
457
1
123
48

Expected output:
14


Actual output:
15


Fixed submission (verdict: Accepted):
N = int(input())
a=[]
for i in range(5):
    a.append(int(input()))
a_min = min(a)
if N%a_min == 0:
    print(5 + int(N/a_min) -1)
else:
    print(5+ int(N/a_min))

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N = int(input())
p = []
for _ in range(5):
    p.append(int(input())) 

print(math.floor(N / min(p)) + 5)

Failing test case input:
10
123
997
2
9
123

Expected output:
9


Actual output:
10


Fixed submission (verdict: Accepted):
import math
N = int(input())
p = []
for _ in range(5):
    p.append(int(input())) 

print(math.ceil(N / min(p)) + 4)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N = int(input())
Cap = [0]*5
time = 5
 
for i in range(5):
    Cap[i] = int(input())
 
    

 

time += math.floor(N/min(Cap))
print(time)

Failing test case input:
10
104
811
2
9
123

Expected output:
9


Actual output:
10


Fixed submission (verdict: Accepted):
import math
N = int(input())
Cap = [0]*5
time = 4
 
for i in range(5):
    Cap[i] = int(input())
 
    
time += math.ceil(N/min(Cap))
print(time)
Problem: p03077
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())
ABCDE = [0] * 5
for _ in range(5):
    ABCDE[_] = int(input())

neck = min(ABCDE)
neck_index = ABCDE.index(neck)

ans = N 
print(ans)


Failing test case input:
10
123
633
27
123
123

Expected output:
5


Actual output:
10


Fixed submission (verdict: Accepted):
from math import ceil

N = int(input())
ABCDE = [0] * 5
for _ in range(5):
    ABCDE[_] = int(input())

neck = min(ABCDE)
neck_index = ABCDE.index(neck)

ans = ceil(N / neck) + 4
print(ans)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

l = []

n = int(input())

for i in range(5):
    l.append(int(input()))

l.sort()

print(int(n%l[0])+5)


Failing test case input:
10000000007
2
3
5
7
6

Expected output:
5000000008


Actual output:
6


Fixed submission (verdict: Accepted):

import math
l = []

n = int(input())

for i in range(5):
    l.append(int(input()))

l.sort()

print(math.ceil(n/l[0])+4)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

n = int(input())
a = []
for i in range(5):
    a.append(int(input()))
print(int(n/min(a) + 5))

Failing test case input:
10
123
633
2
9
123

Expected output:
9


Actual output:
10


Fixed submission (verdict: Accepted):

import math
n = int(input())
a = []
for i in range(5):
    a.append(int(input()))
ans = math.ceil((n/min(a) + 5) - 1)
print(ans)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())

l = [None] * 5

for i in range(5):
    l[i] = int(input())

split = 0 if int(N/min(l)) <= 1 else int(N/min(l))
print(5+split)

Failing test case input:
10
123
1239
27
9
123

Expected output:
6


Actual output:
5


Fixed submission (verdict: Accepted):
from math import ceil
N = int(input())

l = [None] * 5

for i in range(5):
    l[i] = int(input())

print(4 + ceil(N/min(l)))

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

an = []
for i in range(6):
    temp = input()
    an.append(int(temp))

N = an[0]
an.pop(0)

print(int(N/min(an)) + 5)


Failing test case input:
5
4
3
4
1
6

Expected output:
9


Actual output:
10


Fixed submission (verdict: Accepted):
import math

an = []
for i in range(6):
    temp = input()
    an.append(int(temp))

N = an[0]
an.pop(0)

print(math.ceil((N / min(an)) + 4))

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
print(int((N)/min(a,b,c,d,e))+5)


Failing test case input:
10
104
811
2
9
123

Expected output:
9


Actual output:
10


Fixed submission (verdict: Accepted):
N=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
print(int((N-1)/min(a,b,c,d,e))+5)
Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

ans = n/min(a,b,c,d,e)+5
print(ans)

Failing test case input:
10000000007
2
3
5
7
6

Expected output:
5000000008


Actual output:
5000000008.5


Fixed submission (verdict: Accepted):
import math
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

ans = math.ceil(n/min(a,b,c,d,e))+4
print(ans)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
duration = [int(input()) for _ in range(5)]
if(min(duration)>=N):
    print(5)
else:
    print(int(N/min(duration))+5)


Failing test case input:
5
4
3
6
1
6

Expected output:
9


Actual output:
10


Fixed submission (verdict: Accepted):
N = int(input())
capacity = [int(input()) for _ in range(5)]
m = min(capacity)
if(m>=N):
    print(5)
elif(N%m==0):
    print(int(N/m)+4)
else:
    print(int(N/m)+5)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
l = []
for i in range(5):
    l.append(int(input()))

minimum = min(l)

ans = n 

print(ans)

Failing test case input:
10
127
296
27
120
123

Expected output:
5


Actual output:
10


Fixed submission (verdict: Accepted):
n = int(input())
l = []
for i in range(5):
    l.append(int(input()))

minimum = min(l)
if n % minimum == 0:
    ans = n / minimum + 4
else:
    ans = (n 

print(int(ans))

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
l=[int(input()) for i in range(5)]
min_l=min(l)
t=int(n/min_l)+5
print(t)

Failing test case input:
10000000007
2
3
1
2
11

Expected output:
10000000011


Actual output:
10000000012


Fixed submission (verdict: Accepted):
n=int(input())
l=[int(input()) for i in range(5)]
min_l=min(l)
if n%min_l==0:
  t=int(n/min_l)+4
else:
  t=int(n/min_l)+5
print(t)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
print(int(5/min(a,b,c,d,e))+4)


Failing test case input:
10
123
123
123
123
123

Expected output:
5

Actual output:
4


Fixed submission (verdict: Accepted):
N=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
print(int((N-1)/min(a,b,c,d,e))+5)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())

m = min(a, b, c, d, e)
print(int(n/m) + 5)


Failing test case input:
10
123
997
2
9
123

Expected output:
9


Actual output:
10


Fixed submission (verdict: Accepted):
import math
n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())

m = min(a, b, c, d, e)
print(math.ceil(n/m) + 4)
Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

N = int(input())
l = []
for i in range(5):
    l.append(int(input()))
min_index = l.index(min(l))
total = N 
print(total + len(l) - min_index)

Failing test case input:
10
241
423
123
123
194

Expected output:
5


Actual output:
13


Fixed submission (verdict: Accepted):

from math import ceil
N = int(input())
l = []
for i in range(5):
    l.append(int(input()))
print(ceil(N / min(l) + 4))

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

n = int(input())
a = [int(input()) for _ in range(5)]

time = 5 + int(n/min(a))

print(time)


Failing test case input:
5
4
3
6
1
6

Expected output:
9


Actual output:
10


Fixed submission (verdict: Accepted):

import math

n = int(input())
a = [int(input()) for _ in range(5)]

time = 4 + math.ceil(n/min(a))

print(time)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = [int(input()) for _ in range(5)]
small = min(A)
a = A.index(min(A)) 
bottle = (N+1)/small if small!=1 else N
print(int(4+max(bottle,1)))

Failing test case input:
10
123
1239
27
9
45

Expected output:
6


Actual output:
5


Fixed submission (verdict: Accepted):
N = int(input())
A = [int(input()) for _ in range(5)]
small = min(A)
a = A.index(min(A)) 
bottle = (N+small-1)/small if small!=1 else N
print(int(4+max(bottle,1)))

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
t =[0]*5
for i in range(5):
  t[i]=int(input())
  
min_t = min(t)
ans= N / min_t + 4

print(ans)

Failing test case input:
10
110
1017
3
9
29

Expected output:
8


Actual output:
7.333333333333334


Fixed submission (verdict: Accepted):
import math
N=int(input())
t =[0]*5
for i in range(5):
  t[i]=int(input())
  
min_t = min(t)
ans= math.ceil(N / min_t) + 4
print(ans)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
print(int(5+N/min(A,B,C,D,E)))

Failing test case input:
10
104
1017
2
9
123

Expected output:
9


Actual output:
10


Fixed submission (verdict: Accepted):
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
if N%min(A,B,C,D,E) == 0:z = 4
else:z = 5
print(int(z+N/min(A,B,C,D,E)))

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

s=[int(input()) for x in range(6)]

n=s.pop(0)

t=int(5+math.floor(n/min(s)))
    
print(t)

Failing test case input:
10
123
997
2
9
123

Expected output:
9


Actual output:
10


Fixed submission (verdict: Accepted):
import math

s=[int(input()) for x in range(6)]

n=s.pop(0)
t=int(4+math.ceil(1.0*n/min(s)))

print(t)
Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = [int(input()) for i in range(5)]
A.sort()
cnt = N
if cnt>0:
    print(cnt+5)
else:
    print(5)


Failing test case input:
10
342
423
123
41
208

Expected output:
5


Actual output:
15


Fixed submission (verdict: Accepted):
import math
N = int(input())
A = [int(input()) for i in range(5)]
A.sort()
cnt = N/A[0]
print(math.ceil(cnt)+4)

Problem: p03077
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
info=[]
for _ in range(6):
  info.append(int(input()))
ans=4+info[0]
print(ans)

Failing test case input:
10
204
70
27
120
123

Expected output:
5


Actual output:
14


Fixed submission (verdict: Accepted):
info=[]
for _ in range(6):
  info.append(int(input()))
from math import ceil
ans=4+ceil(info[0]/min(info[1:]))
print(ans)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
trans = [int(input()) for i in range(5)]

print(int(5 + (n - min(trans)) / min(trans)) + 1) if n > min(trans) else print(5)

Failing test case input:
10
31
457
1
123
48

Expected output:
14


Actual output:
15


Fixed submission (verdict: Accepted):
import math
n = int(input())
trans = [int(input()) for i in range(5)]

print((5 + math.ceil((n - min(trans)) / min(trans)))) if n > min(trans) else print(5)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
input = sys.stdin.readline
N=int(input())
P=[None]*5
for i in range(5):
    P[i]=int(input())

m = min(P)

c = N
print(c+4)


Failing test case input:
10
127
296
27
123
123

Expected output:
5


Actual output:
14


Fixed submission (verdict: Accepted):
import sys,math
input = sys.stdin.readline
N=int(input())
P=[None]*5
for i in range(5):
    P[i]=int(input())
 
m = min(P)
 
if m >= N:
    print(5)
else:
    c = math.ceil(N/m)
    print(c+4)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from math import floor
temp_list = [int(input()) for _ in range(6)]
n = temp_list.pop(0)
print(5 + floor(n / min(temp_list)))


Failing test case input:
10
123
3412
27
16
10

Expected output:
5


Actual output:
6


Fixed submission (verdict: Accepted):
from math import ceil
temp_list = [int(input()) for _ in range(6)]
n = temp_list.pop(0)
print(4 + ceil(n / min(temp_list)))

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, L = int(input()), [int(input()) for i in range(5)]
ans = 5 if N < min(L) else N % min(L) + N 
print(ans)


Failing test case input:
5
3
2
4
1
6

Expected output:
9


Actual output:
5


Fixed submission (verdict: Accepted):
import math
N, L = int(input()), [int(input()) for i in range(5)]
ans = 5 if N < min(L) else math.ceil(N / min(L)) + 4
print(ans)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
ninzu = [int(input()) for i in range(5)]
min_ = min(ninzu)
a, b = divmod(N, min_)
print(a + 5)

Failing test case input:
10
123
1521
27
2
45

Expected output:
9


Actual output:
10


Fixed submission (verdict: Accepted):
N = int(input())
ninzu = [int(input()) for i in range(5)]
import math
min_ = min(ninzu)
a = math.ceil(N / min_)
print(a + 4)
Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())

 
min = min(a,b,c,d,e)

print(int(n/min)+5)

Failing test case input:
5
3
2
4
1
6

Expected output:
9


Actual output:
10


Fixed submission (verdict: Accepted):
n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
 
 
min = min(a,b,c,d,e)
 
print(int((n-1)/min)+5)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
trans = sorted(list(int(input()) for _ in range(5)))

ans = n 
print(ans)


Failing test case input:
10
123
219
123
123
123

Expected output:
5


Actual output:
10


Fixed submission (verdict: Accepted):
import math

n = int(input())
trans = sorted(list(int(input()) for _ in range(5)))

ans = math.ceil(n / trans[0]) + 4
print(ans)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
m = []
for i in range(5):
    m.append(int(input()))
ans = int(n / min(m)) + 5
                
print(ans)

Failing test case input:
10
104
1017
2
9
29

Expected output:
9


Actual output:
10


Fixed submission (verdict: Accepted):
n = int(input())
m = []
for i in range(5):
    m.append(int(input()))
ans = int(n / min(m))
if n % min(m) != 0:
    ans += 5
else:
    ans += 4
print(ans)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())

max_nums = []
for i in range(5):
  max_nums.append(int(input()))
a = n/min(max_nums)
print(int(a)*5 + (0 if a == int(a) else 1))



Failing test case input:
10
104
811
2
9
123

Expected output:
9


Actual output:
25


Fixed submission (verdict: Accepted):
n = int(input())

max_nums = []
for i in range(5):
  max_nums.append(int(input()))
max_nums.append(n)
a = n/min(max_nums)
print(int(a) +4+ (0 if a == int(a) else 1))

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())

people = [n,0,0,0,0,0]
max_nums = []
for i in range(5):
  max_nums.append(int(input()))
print(int(n / min(max_nums))+1)

Failing test case input:
10
123
1239
27
9
45

Expected output:
6


Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())

max_nums = []
for i in range(5):
  max_nums.append(int(input()))
max_nums.append(n)
a = n/min(max_nums)
print(int(a) +4+ (0 if a == int(a) else 1))

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N = int(input())
A = [int(input(a)) for a in range(5)]
print(math.ceil(N / min(A)) + 4)

Failing test case input:
10
123
2070
33
11
36

Expected output:
5


Actual output:
012345


Fixed submission (verdict: Accepted):
import math
N = int(input())
A = [int(input()) for a in range(5)]
print(math.ceil(N / min(A)) + 4)
Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
l=[]
for i in range(5):
    l.append(int(input()))

if n == 0:
    res = 0
else:
    res = int(n/min(l)) + 5

print(res)

Failing test case input:
10000000007
2
3
1
6
11

Expected output:
10000000011


Actual output:
10000000012


Fixed submission (verdict: Accepted):
import math

n = int(input())
l=[]
for i in range(5):
    l.append(int(input()))

if n == 0:
    res = 0
else:
    res = math.ceil(n/min(l)) + 4

print(res)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
print(int(5/min(a,b,c,d,e))+5)

Failing test case input:
10
123
1412
27
9
45

Expected output:
6


Actual output:
5


Fixed submission (verdict: Accepted):
N=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
print(int((N-1)/min(a,b,c,d,e))+5)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
TOSHI=[int(input()) for _ in range(5)]
print(5+int(N/min(TOSHI)))

Failing test case input:
10
104
1017
2
9
29

Expected output:
9


Actual output:
10


Fixed submission (verdict: Accepted):
import math
N=int(input())
TOSHI=[int(input()) for _ in range(5)]
COST=math.ceil(N/min(TOSHI))
print(4+COST)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

N = int(input())
c = [int(input()) for _ in range(5)]

key = min(c)

ans = 0

if N % key == 0:
    ans = N / key
else:
    ans = N 

print(ans + 4)

Failing test case input:
5
4
2
4
1
6

Expected output:
9


Actual output:
9.0


Fixed submission (verdict: Accepted):

N = int(input())
c = [int(input()) for _ in range(5)]

key = min(c)

ans = 0

anss = 4 + int((N+key-1)/key)
print(anss)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
t = []
for i in range(5):
    t.append(int(input()))

mt = min(t)
print(int(N / min(t)) + 5)

Failing test case input:
10
31
457
1
123
48

Expected output:
14


Actual output:
15


Fixed submission (verdict: Accepted):
N = int(input())
t = []
for i in range(5):
    t.append(int(input()))

mt = min(t)
if N%mt!=0:
    print(int(N / mt) + 5)
else:
    print(int(N/mt) + 4)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
li = [int(input()) for i in range(5)]

mn = min(li)

gn = n

print(5 if mn == n else 5+gn-1)

Failing test case input:
10
307
180
123
31
95

Expected output:
5


Actual output:
14


Fixed submission (verdict: Accepted):
n = int(input())
li = [int(input()) for i in range(5)]

mn = min(li)



print((n+mn-1)
Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


N = int(input())
ls = []
for _ in range(5):
    ls.append(int(input()))
if N <= min(ls):
    print(5)
else:
    mint = min(ls)
    ans = 4+ N
    print(ans)

Failing test case input:
10
123
633
2
9
123

Expected output:
9


Actual output:
14


Fixed submission (verdict: Accepted):


import math

N = int(input())
ls = []
for _ in range(5):
    ls.append(int(input()))

if N <= min(ls):
    print(5)
else:
    mint = min(ls)
    ans = 4 + math.ceil(N/mint) 
    print(ans)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n = int(input())
num = [int(input()) for i in range(5)]
if min(num)>=n:
    print(5)

print(4+math.ceil(n/min(num)))

Failing test case input:
10
127
130
27
123
123

Expected output:
5


Actual output:
5
5


Fixed submission (verdict: Accepted):
import math
n = int(input())
num = [int(input()) for i in range(5)]
print(4+math.ceil(n/min(num)))

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from math import ceil
n = int(input())
ps = [int(input()) for _ in range(5)]
min_p = min(ps)
times = 0 if n % min_p == 0 else n 
print(times + 5)

Failing test case input:
10
31
457
1
123
48

Expected output:
14


Actual output:
5


Fixed submission (verdict: Accepted):
from math import ceil
n = int(input())
ps = [int(input()) for _ in range(5)]
min_p = min(ps)
times = ceil(n / min_p) - 1
print(times + 5)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from math import ceil

N = int(input())

l = [None] * 5

for i in range(5):
    l[i] = int(input())

print(5 + ceil(N/min(l)))

Failing test case input:
10
95
282
26
123
123

Expected output:
5


Actual output:
6


Fixed submission (verdict: Accepted):
from math import ceil
N = int(input())

l = [None] * 5

for i in range(5):
    l[i] = int(input())

print(4 + ceil(N/min(l)))

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
li = [int(input()) for i in range(5)]

mn = min(li)

gn = n

print(5+gn-1 if mn != n else 5)

Failing test case input:
10
123
1239
33
11
46

Expected output:
5


Actual output:
14


Fixed submission (verdict: Accepted):
n = int(input())
li = [int(input()) for i in range(5)]

mn = min(li)



print((n+mn-1)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = [int(input()) for _ in range(5)]

res = N 

print(res)


Failing test case input:
10
123
219
123
123
123

Expected output:
5


Actual output:
10


Fixed submission (verdict: Accepted):
import math

N = int(input())
A = [int(input()) for _ in range(5)]

res = math.ceil(N / min(A)) + 4

print(res)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
p=[0]*5
for i in range(5):
    p[i]=int(input())
p.sort()
ans=5+(n-n%p[0])/p[0]
print(int(ans))

Failing test case input:
10
123
633
2
9
123

Expected output:
9


Actual output:
10


Fixed submission (verdict: Accepted):
n=int(input())
p=[0]*5
for i in range(5):
    p[i]=int(input())
p.sort()
if n%p[0]!=0:
    ans=5+(n-n%p[0])/p[0]
else:
    ans=4+n/p[0]
print(int(ans))
Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())

 
min = min(a,b,c,d,e)

print(int(n-1/min)+5)

Failing test case input:
10
180
219
123
123
123

Expected output:
5


Actual output:
14


Fixed submission (verdict: Accepted):
n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
 
 
min = min(a,b,c,d,e)
 
print(int((n-1)/min)+5)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = []
for i in range(5):
    a.append(int(input()))
min_flow = min(a)
delay = n 
print(5 + delay)


Failing test case input:
10
188
180
123
31
95

Expected output:
5


Actual output:
15


Fixed submission (verdict: Accepted):
import math
n = int(input())
a = []
for i in range(5):
    a.append(int(input()))
min_flow = min(a)
delay = math.ceil(n / min_flow - 1)
print(5 + delay)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N=int(input())
List=[int(input()) for i in range(5)]
sList = sorted(List, reverse=True)
if sList[4]>=N:
  print(5)
else:
  print(round(N/sList[4])+5)

Failing test case input:
10000000007
2
3
1
2
11

Expected output:
10000000011


Actual output:
10000000012


Fixed submission (verdict: Accepted):
import math
N=int(input())
List=[int(input()) for i in range(5)]
sList = sorted(List)

if sList[0]>=N:
  print(5)
else:
  print(math.ceil(N/sList[0])+4)

Problem: p03077
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
X = [int(input()), int(input()), int(input()), int(input()), int(input())]

print(int(N/min(X)) + 5)

Failing test case input:
10000000007
2
3
1
2
11

Expected output:
10000000011


Actual output:
10000000012


Fixed submission (verdict: Accepted):
import math
N = int(input())
X = [int(input()), int(input()), int(input()), int(input()), int(input())]

print(math.ceil(N/min(X)) + 4)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


N = int(input())
ls = []
for _ in range(5):
    ls.append(int(input()))
if N <= min(ls):
    print(5)
else:
    mint = min(ls)
    ans = 5 + N
    print(ans)

Failing test case input:
10000000007
2
3
7
5
3

Expected output:
5000000008


Actual output:
10000000012


Fixed submission (verdict: Accepted):


import math

N = int(input())
ls = []
for _ in range(5):
    ls.append(int(input()))

if N <= min(ls):
    print(5)
else:
    mint = min(ls)
    ans = 4 + math.ceil(N/mint) 
    print(ans)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
T = [int(input()) for _ in range(5)]
print(int(N/min(T))+1+4)

Failing test case input:
10
104
811
2
9
123

Expected output:
9


Actual output:
10


Fixed submission (verdict: Accepted):
import math
N = int(input())
T = [int(input()) for _ in range(5)]
print(math.ceil(N/min(T))+4)
Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())

x = min([int(input()) for _ in range(5)])

print(5 + int(n/x))

Failing test case input:
10000000007
2
3
1
6
11

Expected output:
10000000011


Actual output:
10000000012


Fixed submission (verdict: Accepted):
from math import ceil

n = int(input())

x = min([int(input()) for _ in range(5)])

print(4 + ceil(n/x))

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from math import ceil
n, *A = map(int, open(0).readlines())
print(5 + max(ceil(n / a) for a in A))

Failing test case input:
10
241
219
123
123
194

Expected output:
5


Actual output:
6


Fixed submission (verdict: Accepted):
from math import ceil
n, *A = map(int, open(0).readlines())
print(4 + max(ceil(n / a) for a in A))

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())

mini=min(A,B,C,D,E)

print(mini+4)

Failing test case input:
10
308
180
123
31
95

Expected output:
5


Actual output:
35


Fixed submission (verdict: Accepted):
import math

N=int(input())
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())

mini=math.ceil(N/min(A,B,C,D,E))

print(mini+4)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
li = [int(input()) for i in range(5)]

mn = min(li)

gn = n

print(5+gn-1)

Failing test case input:
10
127
145
11
123
200

Expected output:
5


Actual output:
14


Fixed submission (verdict: Accepted):
n = int(input())
li = [int(input()) for i in range(5)]

mn = min(li)



print((n+mn-1)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


people = int(input())
capacities = [int(input()) for i in range(5)]
capacities = sorted(capacities)
print(5 + int(people/capacities[0]))


Failing test case input:
10
104
1017
2
9
38

Expected output:
9


Actual output:
10


Fixed submission (verdict: Accepted):

from math import ceil

people = int(input())
capacities = [int(input()) for i in range(5)]
print(5 + ceil(people/sorted(capacities)[0] - 1))

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n = int(input())
a = []
for _ in range(5):
    a.append(int(input()))
if min(a) >= n:
    ans = 5
else:
    ans = math.floor(n / min(a)) + 5
print(ans)

Failing test case input:
10
104
1017
2
9
29

Expected output:
9


Actual output:
10


Fixed submission (verdict: Accepted):
import math
n = int(input())
a = []
for _ in range(5):
    a.append(int(input()))
ans = math.ceil(n / min(a)) + 4
print(ans)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n1 = int(input())
na1 = []

for i1 in range(5):
    na1.append(int(input()))

n2 = min(na1)

r1 = n1 

r1 += 5
print(r1)

Failing test case input:
10
123
1412
27
9
45

Expected output:
6


Actual output:
15


Fixed submission (verdict: Accepted):

n1 = int(input())
na1 = []

for i1 in range(5):
    na1.append(int(input()))

n2 = min(na1)

r1 = n1 

if n1 % n2 == 0 and n1 
    r1 -= 1

r1 += 5
print(r1)
Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = [int(input()) for _ in range(5)]
small = min(A)
a = A.index(min(A)) 
bottle = (N+1)/small
print(int(4+max(bottle,1)))

Failing test case input:
10
123
1239
27
9
123

Expected output:
6


Actual output:
5


Fixed submission (verdict: Accepted):
N = int(input())
A = [int(input()) for _ in range(5)]
small = min(A)
a = A.index(min(A)) 
bottle = (N+small-1)/small if small!=1 else N
print(int(4+max(bottle,1)))

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
time = [int(input()) for _ in range(5)]

bottleneck = min(time)
print(round(N / bottleneck, 0) + 4)

Failing test case input:
10
123
2070
33
11
36

Expected output:
5


Actual output:
5.0


Fixed submission (verdict: Accepted):
N = int(input())
time = [int(input()) for _ in range(5)]

bottleneck = min(time)
print(-(-N

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
a=[]
for i in range(5):
  a.append(int(input()))

time = int(N/min(a))+5
print(time)

Failing test case input:
5
4
3
6
1
6

Expected output:
9


Actual output:
10


Fixed submission (verdict: Accepted):
N = int(input())
import math
a=[]
for i in range(5):
  a.append(int(input()))
 
time = math.ceil(N/min(a))+4
print(time)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
city = [int(input()) for i in range(5)]

city = sorted(city)

ans = N 
    
print(ans)

Failing test case input:
10
123
123
123
123
91

Expected output:
5


Actual output:
10


Fixed submission (verdict: Accepted):
N = int(input())
city = [int(input()) for i in range(5)]

city = sorted(city)

ans = ((N+city[0]-1) 
    
print(ans)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N=int(input())
List=[int(input()) for i in range(5)]
sList = sorted(List, reverse=True)
if sList[4]>=N:
  print(5)
else:
  print(math.ceil(N/sList[4])+5)


Failing test case input:
5
3
2
4
3
6

Expected output:
7


Actual output:
8


Fixed submission (verdict: Accepted):
import math
N=int(input())
List=[int(input()) for i in range(5)]
sList = sorted(List)

if sList[0]>=N:
  print(5)
else:
  print(math.ceil(N/sList[0])+4)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

s=[int(input()) for x in range(6)]

n=s.pop(0)

t=int(5+math.ceil(n/min(s)))

print(t)

Failing test case input:
10
123
2070
33
11
46

Expected output:
5


Actual output:
6


Fixed submission (verdict: Accepted):
import math

s=[int(input()) for x in range(6)]

n=s.pop(0)
t=int(4+math.ceil(1.0*n/min(s)))

print(t)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = [int(input()) for _ in range(5)]

res = int(N / min(A) + 1) + 4

print(res)


Failing test case input:
10
123
1521
27
2
45

Expected output:
9


Actual output:
10


Fixed submission (verdict: Accepted):
import math

N = int(input())
A = [int(input()) for _ in range(5)]

res = math.ceil(N / min(A)) + 4

print(res)
Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from math import floor
N = int(input())
A = [int(input()) for _ in range(5)]

ans = floor(N/min(A)) + 5

print(ans)

Failing test case input:
10000000007
2
3
1
6
11

Expected output:
10000000011


Actual output:
10000000012


Fixed submission (verdict: Accepted):
from math import ceil
N = int(input())
A = [int(input()) for _ in range(5)]

ans = ceil(N/min(A)) + 4

print(ans)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

n = int(input())
k = []
for i in range(5):
    k.append(int(input()))
print(math.ceil(n / min(k)))

Failing test case input:
10
241
423
123
123
208

Expected output:
5


Actual output:
1


Fixed submission (verdict: Accepted):
import math

n = int(input())
k = []
for i in range(5):
    k.append(int(input()))
print(math.ceil(n / min(k)) + 4)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

x = min(A, B, C, D, E)
ans = N 
print(ans)

Failing test case input:
10
123
2070
33
11
36

Expected output:
5


Actual output:
10


Fixed submission (verdict: Accepted):
import math
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

x = min(A, B, C, D, E)
ans = math.ceil(N / x) + 4
print(ans)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())

x=min(A,B,C,D,E)
loss=N

print(5+loss)


Failing test case input:
10
241
423
123
123
194

Expected output:
5


Actual output:
15


Fixed submission (verdict: Accepted):
N=int(input())
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())

x=min(A,B,C,D,E)
loss=-(-(N-x)

print(max(5+loss,5))

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
limits = [int(input()) for _ in range(5)]

limit = min(limits)

min_time = 5
min_time += n 

print(min_time)


Failing test case input:
10
123
123
123
123
91

Expected output:
5


Actual output:
15


Fixed submission (verdict: Accepted):
import math

n = int(input())
limits = [int(input()) for _ in range(5)]

limit = min(limits)

min_time = 5
min_time += math.ceil((n - limit) / limit)

print(min_time)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
ABCDE = [int(input()) for i in range(5)]
key = min(ABCDE)
key = N / key + 4
if key != int(key):
    key = int(key + 1)
print(key)

Failing test case input:
10000000007
2
3
1
2
11

Expected output:
10000000011


Actual output:
10000000011.0


Fixed submission (verdict: Accepted):
N = int(input())
ABCDE = [int(input()) for i in range(5)]
key = min(ABCDE)
key = N / key + 4
if key != int(key):
    key = int(key + 1)
print(int(key))
Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = [int(input()) for i in range(5)]
A.sort()
cnt = N
if cnt>1:
    print(cnt+5)
else:
    print(5)


Failing test case input:
10
241
423
123
123
194

Expected output:
5


Actual output:
15


Fixed submission (verdict: Accepted):
import math
N = int(input())
A = [int(input()) for i in range(5)]
A.sort()
cnt = N/A[0]
print(math.ceil(cnt)+4)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

ans = n
print(ans)

Failing test case input:
10
123
811
2
9
123

Expected output:
9


Actual output:
10


Fixed submission (verdict: Accepted):
import math
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

ans = math.ceil(n/min(a,b,c,d,e))+4
print(ans)

Problem: p03077
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
T = []
for _ in range(5):
  T.append(int(input()))
ans = 5 + n 
print(ans)

Failing test case input:
10
66
4476
46
16
69

Expected output:
5


Actual output:
15


Fixed submission (verdict: Accepted):
n = int(input())
T = []
for _ in range(5):
  T.append(int(input()))
ans = 4 - ((-n) 
print(ans)
Problem: p03497
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from collections import Counter
N,K=map(int,input().split())
N=list(map(int,input().split()))
A=Counter(N)
C=list(A.values())
if len(C)<=K:
    print(0)
else:
    ans=sum(C[-(len(C)-K):])
    print(ans)

Failing test case input:
10 3
5 1 3 2 4 1 1 2 3 4

Expected output:
3

Actual output:
4


Fixed submission (verdict: Accepted):
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)

Problem: p03497
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,k = map(int, input().split( ))
import sys
from collections import Counter
input = sys.stdin.readline
a = list(map(int,input().split( )))

ac = Counter(a)
cnt = []
for ke in ac:
    cnt.append(ac[ke])
cnt.sort()
if len(cnt)<=2:
    print(0)
else:
    print(sum(cnt[:-2]))

Failing test case input:
4 4
1 1 4 2

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
n,k = map(int, input().split( ))
import sys
from collections import Counter
input = sys.stdin.readline
a = list(map(int,input().split( )))

ac = Counter(a)
cnt = []
for ke in ac:
    cnt.append(ac[ke])
cnt.sort()
if len(cnt)<=k:
    print(0)
else:
    print(sum(cnt[:-k]))

Problem: p03497
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from collections import Counter



n,k=10, 3
l=[5, 1, 3, 2, 4, 1, 1, 2, 3, 4]

l=Counter(l)

if len(l) > k:
  ans=0
else:
  sl=sorted(list(l.values()))
  num=k-len(l)
  print(sl[:num-1])
    


Failing test case input:
5 4
0 1 2 2 1

Expected output:
0


Actual output:

Fixed submission (verdict: Accepted):
from collections import Counter

n,k=map(int,input().split())
l=list(map(int,input().split()))

l=Counter(l)

if len(l) <= k:
  ans=0
else:
  sl=sorted(list(l.values()))
  num=len(l)-k
  ans=sum(sl[:num])
  
print(ans)

Problem: p03497
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,k=map(int,input().split())
d=dict()
for i in map(int,input().split()):
  if i not in d:
    d[i]=1
  else:
    d[i]+=1
m=list(d.keys())
m.sort()
n-=k
ans=0
for i in m:
  if n<=0:
    break
  n-=d[i]
  ans+=1
print(ans)

Failing test case input:
10 3
3 2 3 4 8 1 2 2 3 4

Expected output:
2


Actual output:
3


Fixed submission (verdict: Accepted):
n,k=map(int,input().split())
d=dict()
for i in map(int,input().split()):
  if i not in d:
    d[i]=1
  else:
    d[i]+=1
m=list(d.values())
m.sort()
a=len(m)-k
ans=0
for i in m:
  if a<=0:
    break
  a-=1
  ans+=i
print(ans)
Problem: p03497
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,k=map(int,input().split())
a_list=[int(i) for i in input().split()]
count={}
for a in a_list:
    count[a]=count.get(a,0)+1
val=list(count.values())
sorted(val,reverse=True)
print(sum(val[k:]))

Failing test case input:
10 1
5 1 3 2 4 1 2 2 3 8

Expected output:
7


Actual output:
9


Fixed submission (verdict: Accepted):
n,k=map(int,input().split())
a_list=[int(i) for i in input().split()]
count={}
for a in a_list:
    count[a]=count.get(a,0)+1
val=list(count.values())
val.sort(reverse=True)
print(sum(val[k:]))

Problem: p03497
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter
n,k = map(int,input().split())
L = list( map(int,input().split()))

L = Counter(L)
L = sorted(list(L.most_common()))[::-1]

L = L[:len(L)-k]
ans = 0
for i in range(len(L)):
    ans += L[i][1]
print(ans)

Failing test case input:
0 6
-2 1 3 9

Expected output:
0


Actual output:
2


Fixed submission (verdict: Accepted):
from collections import Counter
n,k = map(int,input().split())
L = list( map(int,input().split()))
l = len(L)
L = Counter(L)
L = sorted(list(L.most_common(k)))

ans = 0
for i in range(len(L)):
    ans += L[i][1]
if l >= ans:
    print(l - ans)
else:
    print(0)

Problem: p03497
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from collections import defaultdict
N, K = map(int,input().split())
A = list(map(int,input().split()))
D = defaultdict(int)
for a in A:
  D[a]+=1
D = sorted(D.items(), key=lambda x:x[1])
ans = 0
if len(D)<=K:
  print(ans)
else:
    for i in range(K-1):
      ans+=D[i][1]
    print(ans)

Failing test case input:
10 3
5 1 3 4 8 1 2 2 6 4

Expected output:
4


Actual output:
2


Fixed submission (verdict: Accepted):
from collections import defaultdict
N, K = map(int,input().split())
A = list(map(int,input().split()))
D = defaultdict(int)
for a in A:
  D[a]+=1
D = sorted(D.values())
ans = 0
if len(D)<=K:
  print(ans)
else:
    print(sum(D[:len(D)-K]))

Problem: p03497
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from collections import Counter 

N, K = map(int, input().split())
A = list(map(int, input().split()))
s = len(set(A))
t = s-K

c = Counter(A)
num = list(c)
num.sort()
print(num,t)
print(sum(num[:t])) if t>0 else print(0)

Failing test case input:
3 7
-2 1 2 3

Expected output:
0


Actual output:
[-2, 1, 2, 3] -3
0


Fixed submission (verdict: Accepted):
from collections import Counter 

N, K = map(int, input().split())
A = list(map(int, input().split()))
s = len(set(A))
t = s-K

c = Counter(A)
num = list(c.values())
num.sort()

print(sum(num[:t])) if t>0 else print(0)
Problem: p03497
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import defaultdict

N, K = map(int, input().split())
A = list(map(int, input().split()))

d = defaultdict(int)
for key in A:
    d[key] += 1
ans = 0
for key, i in sorted(d.items(), key = lambda x:x[0], reverse=True)[:-K]:
    ans += i
print(ans)

Failing test case input:
10 3
5 1 3 4 8 1 2 2 6 4

Expected output:
4


Actual output:
5


Fixed submission (verdict: Accepted):
from collections import defaultdict

N, K = map(int, input().split())
A = list(map(int, input().split()))

d = defaultdict(int)
for key in A:
    d[key] += 1
ans = 0
for key, i in sorted(d.items(), key = lambda x:x[1])[:-K]:
    ans += i
print(ans)

Problem: p03497
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import collections
N,K = map(int,input().split())
A = list(map(int,input().split()))
c = collections.Counter(A).most_common()[::-1]
print(c)
k = len(c)
if k<=K:print(0)
else: print(sum([e[1] for e in c[:k-K]]))

Failing test case input:
3 7
-4 1 1 1

Expected output:
0


Actual output:
[(-4, 1), (1, 3)]
0


Fixed submission (verdict: Accepted):
import collections
N,K = map(int,input().split())
A = list(map(int,input().split()))
c = collections.Counter(A).most_common()[::-1]
k = len(c)
if k<=K:print(0)
else: print(sum([e[1] for e in c[:k-K]]))

Problem: p03497
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter
N,K = map(int,input().split())
A = list(map(int,input().split()))
c = Counter(A)
values_list = list(c.values())
values_list.reverse()
ans = 0
for i in range(len(values_list)-K):
    ans += values_list[i]
print(ans)

Failing test case input:
10 1
5 2 3 2 4 1 2 2 3 8

Expected output:
6


Actual output:
9


Fixed submission (verdict: Accepted):
from collections import Counter
N,K = map(int,input().split())
A = list(map(int,input().split()))
c = Counter(A)
values_list = list(c.values())
values_list.sort()
ans = 0
for i in range(len(values_list)-K):
    ans += values_list[i]
print(ans)

Problem: p03497
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import math
import sys
import collections
n,k = map(int, input().split())
A = list(map(int, input().split()))
count=len(A)
Adel=list(set(A))
ans=len(Adel)-k

if ans<0:
    ans=0
    print(ans)
    sys.exit()
newA=collections.Counter(A)
count=list(newA.values())
count.sort()

ans=sum(count[:k-1])
print(ans)

Failing test case input:
4 3
-2 2 2 4

Expected output:
0


Actual output:
2


Fixed submission (verdict: Accepted):
import math
import sys
import collections
n,k = map(int, input().split())
A = list(map(int, input().split()))
count=len(A)
Adel=list(set(A))
ans=len(Adel)-k

if ans<0:
    ans=0
    print(ans)
    sys.exit()
newA=collections.Counter(A)
count=list(newA.values())
count.sort()

ans=sum(count[:-k])
print(ans)