stove.java:1: error: class, interface, or enum expected
public static void main(String[] args){
^
stove.java:3: error: class, interface, or enum expected
int N = scanner.nextInt();
^
stove.java:4: error: class, interface, or enum expected
int K = scanner.nextInt();
^
stove.java:6: error: class, interface, or enum expected
ArrayList<Integer> times = new ArrayList<>();
^
stove.java:8: error: class, interface, or enum expected
for (int i = 0; i < N; i++) {
^
stove.java:8: error: class, interface, or enum expected
for (int i = 0; i < N; i++) {
^
stove.java:8: error: class, interface, or enum expected
for (int i = 0; i < N; i++) {
^
stove.java:10: error: class, interface, or enum expected
times.add(arrival);
^
stove.java:11: error: class, interface, or enum expected
}
^
stove.java:14: error: class, interface, or enum expected
ArrayList<Integer> diffTimes = new ArrayList<>();
^
stove.java:15: error: class, interface, or enum expected
for (int i=1; i < times.size(); i++) {
^
stove.java:15: error: class, interface, or enum expected
for (int i=1; i < times.size(); i++) {
^
stove.java:15: error: class, interface, or enum expected
for (int i=1; i < times.size(); i++) {
^
stove.java:17: error: class, interface, or enum expected
}
^
stove.java:21: error: class, interface, or enum expected
int sum = 0;
^
stove.java:22: error: class, interface, or enum expected
for (int i = N-K; i < N-1; i++) {
^
stove.java:22: error: class, interface, or enum expected
for (int i = N-K; i < N-1; i++) {
^
stove.java:22: error: class, interface, or enum expected
for (int i = N-K; i < N-1; i++) {
^
stove.java:24: error: class, interface, or enum expected
}
^
stove.java:26: error: class, interface, or enum expected
}
^
20 errors