1 条题解
-
0
import java.util.Scanner; public class Main { public static void main(String[] args) { final Scanner scanner = new Scanner(System.in); String in = scanner.nextLine(); in = in.substring(0, in.length() - 1); final String[] sentence = in.split(" "); String best = sentence[0]; int max = 0; for (String word : sentence) { int length = word.length(); if (length <= max) continue; max = length; best = word; } System.out.println(best); } }
- 1
信息
- ID
- 150
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 8
- 标签
- (无)
- 递交数
- 994
- 已通过
- 176
- 上传者