Submission #5906948
Source Code Expand
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (sc.hasNextInt()) { int n = sc.nextInt(); int k = sc.nextInt(); int[] a = new int[n]; int idx1 = -1; for (int i = 0; i < n; i++) { a[i] = sc.nextInt(); if ( a[i] == 1 ) { idx1 = i; } } System.out.println(n / (k - 1)); } } }
Submission Info
Submission Time | |
---|---|
Task | C - Minimization |
User | itohjam |
Language | Java8 (OpenJDK 1.8.0) |
Score | 0 |
Code Size | 565 Byte |
Status | WA |
Exec Time | 448 ms |
Memory | 49592 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 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 | WA | 306 ms | 43516 KB |
10.txt | WA | 387 ms | 47944 KB |
2.txt | WA | 397 ms | 48876 KB |
3.txt | WA | 334 ms | 43928 KB |
4.txt | AC | 430 ms | 49204 KB |
5.txt | AC | 430 ms | 47284 KB |
6.txt | AC | 448 ms | 48140 KB |
7.txt | WA | 166 ms | 28052 KB |
8.txt | WA | 390 ms | 49592 KB |
9.txt | WA | 132 ms | 20996 KB |
sample1.txt | AC | 91 ms | 20052 KB |
sample2.txt | AC | 91 ms | 20564 KB |
sample3.txt | AC | 93 ms | 19412 KB |