Submission #3601718


Source Code Expand

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

minNum = min(A)

removedLen = len( [a for a in A if a != minNum ] )

import math

ans = math.ceil( removedLen/(K-1)) 

print(ans)

Submission Info

Submission Time
Task C - Minimization
User ken31416
Language Python (3.4.3)
Score 300
Code Size 207 Byte
Status AC
Exec Time 52 ms
Memory 14008 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 16
Set Name Test Cases
Sample sample1.txt, sample2.txt, sample3.txt
All sample1.txt, sample2.txt, sample3.txt, 1.txt, 10.txt, 2.txt, 3.txt, 4.txt, 5.txt, 6.txt, 7.txt, 8.txt, 9.txt, sample1.txt, sample2.txt, sample3.txt
Case Name Status Exec Time Memory
1.txt AC 33 ms 7212 KB
10.txt AC 44 ms 10940 KB
2.txt AC 51 ms 14008 KB
3.txt AC 39 ms 9036 KB
4.txt AC 51 ms 12912 KB
5.txt AC 52 ms 13880 KB
6.txt AC 52 ms 13812 KB
7.txt AC 21 ms 3828 KB
8.txt AC 47 ms 12412 KB
9.txt AC 19 ms 3060 KB
sample1.txt AC 19 ms 3064 KB
sample2.txt AC 19 ms 2940 KB
sample3.txt AC 19 ms 3060 KB