编程题: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());
}
}
}

posted on 2025-05-15 18:10  Swishy  阅读(2)  评论(0)    收藏  举报