Can anyone help me with the reading in Java in the PRIME1 problem. Thanks in advance.
Hi,
You can read input in java like this:-
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));int num = Integer.parseInt(bf.readLine());
You can put this line in a for loop and read several times.
Varun