ENG
My code works 100% correct but CodeGym throws me error with condition 2nd and 4th.
Please, can you help me?
PL
Mój kod działa w 100% poprawnie ala CodeGym mi wywala błąd przy warunku nr 2 i nr 4.
Czy możecie mi pomóc?
package pl.codegym.task.task08.task0822;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
/*
Najmniejsza z N liczb
*/
public class Solution {
public static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
public static void main(String[] args) throws Exception {
List<Integer> listaLiczbCalkowitych = getListaLiczbCalkowitych();
System.out.println(getMinimum(listaLiczbCalkowitych));
}
public static int getMinimum(List<Integer> array) {
return Collections.min(array);
}
public static List<Integer> getListaLiczbCalkowitych() throws IOException {
int n = Integer.parseInt(reader.readLine());
List<Integer> list = new LinkedList<>();
for(int i = 0; i<n;i++)
{
list.add(Integer.parseInt(reader.readLine()));
}
return list;
}
}