题解 | #[NOIP2018]标题统计#
[NOIP2018]标题统计
http://www.nowcoder.com/practice/b14b87bc6a4547a6839e0a5867c98dba
import java.util.*; public class Main{ public static void main(String arg[]){ Scanner sc=new Scanner(System.in); int sum=0; while(sc.hasNext()){ String[] str=sc.nextLine().split(" "); for(int i=0;i<str.length;i++) { sum+=str[i].length(); } } System.out.print(sum); } }