解题思路

import java.util.Scanner;

public class Main{
    
    public static void main(String[] args){
        Scanner sin = new Scanner(System.in);
        int i = 0;
        while(sin.hasNext()){
            int s = sin.nextInt();
            if(s > i){
                i = s;
            }
        }
        System.out.println(i);
    }
}