Hi, Please help me to understand the question very clearly. I think I am not getting the question in detail. What is here two types of N ?
package com.codegym.task.task05.task0532;
import java.io.*;
/*
Task about algorithms
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
// the first number is the length of the list
String lN = reader.readLine();
int ln = Integer.parseInt(lN);
String Sn;
Sn = reader.readLine();
int n, nT;
nT = Integer.parseInt(Sn);
while(true){
Sn = reader.readLine();
if ( Sn == null){
break;
}
else{
n = Integer.parseInt(Sn);
nT = (nT > n) ? nT : n ;
}
}
if(ln > 0){
System.out.println(nT);
}
//int maximum = ;
//write your code here
}
}