Submission #2721839
Source Code Expand
import sys
N, K = map(int, sys.stdin.readline().split())
rhs = N - K
ans = rhs // (K - 1) + 1
while (K - 1) * (ans - 1) < rhs:
ans += 1
print(ans)
Submission Info
| Submission Time | |
|---|---|
| Task | C - Minimization |
| User | doseisan |
| Language | Python (3.4.3) |
| Score | 300 |
| Code Size | 158 Byte |
| Status | AC |
| Exec Time | 17 ms |
| Memory | 2940 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 300 / 300 | ||||
| Status |
|
|
| 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 | 17 ms | 2940 KiB |
| 10.txt | AC | 17 ms | 2940 KiB |
| 2.txt | AC | 17 ms | 2940 KiB |
| 3.txt | AC | 17 ms | 2940 KiB |
| 4.txt | AC | 17 ms | 2940 KiB |
| 5.txt | AC | 17 ms | 2940 KiB |
| 6.txt | AC | 17 ms | 2940 KiB |
| 7.txt | AC | 17 ms | 2940 KiB |
| 8.txt | AC | 16 ms | 2940 KiB |
| 9.txt | AC | 17 ms | 2940 KiB |
| sample1.txt | AC | 17 ms | 2940 KiB |
| sample2.txt | AC | 17 ms | 2940 KiB |
| sample3.txt | AC | 17 ms | 2940 KiB |