Java 代码
import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner cin = new Scanner(System.in);
String s = cin.nextLine();
String[] w = s.substring(0, s.length()-1).split(" ");
String mw = "";
for (int i = 0; i < w.length; i ++)
{
if (w[i].length() > mw.length () )
mw = w[i];
}
System.out.println (mw);
}
}