编程题:26
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String line = scanner.nextLine();
line = line.substring(0, line.length() - 1);
String[] words = line.split("\s+");
for (int i = 0; i < words.length; i++) {
if (i > 0) {
System.out.print(" ");
}
System.out.print(words[i].length());
}
}
}
浙公网安备 33010602011771号