enormous input test - run time problem

import java.io.*;
import java.util.LinkedList;

class EnormousInputTest {

public static void main(String[] args) throws IOException {
    //variable for taking n no. of inputs
    int n;
    //a variable "k" for divisiblity
    int k;
    //counter for tracking the no. of divisible numbers
    int count = 0;

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    LinkedList<Integer> ll = new LinkedList<>();
    n = Integer.parseInt(br.readLine());
    k = Integer.parseInt(br.readLine());

    if (n <= Math.pow(10, 7) && k <= Math.pow(10, 7)) {
        while (n > 0) {
            int number = Integer.parseInt(br.readLine());
            if (number < Math.pow(10, 9)) {
                ll.add(number);
            } else {
                System.out.println("Invalid Input my friend-try to be less than 10 to the power 9");
                continue;
            }
            --n;
        }
    } else {
        System.out.println("Invalid Input my friend-try to be less than 10 to the power 7");
    }
    for (int check : ll) {
        if ((check % k) == 0) {
            count++;
        }
    }
    System.out.println(count);

    br.close();
}

}

Check out other codes for input. Your method of inputting is incorrect here-

n = Integer.parseInt(br.readLine()); k = Integer.parseInt(br.readLine());

This line is giving you NZEC

which code should i use besides this to remove the error plz help

//