算法训练 最长字符串  
时间限制:1.0s   内存限制:512.0MB
    
  求出5个字符串中最长的字符串。每个字符串长度在100以内,且全为小写字母。
样例输入
one two three four five
样例输出
three
import java.util.Scanner;
public class Main {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner sc=new Scanner(System.in);
        String str=sc.nextLine();
        String s[]=str.split(" ");
        int len=s[0].length(); 
        int p=0;
        for(int i=1;i<s.length;i++){
            if(len<s[i].length()){ 
                len=s[i].length();
                p=i;
            }
        }
        System.out.println(s[p]);

    }

}