import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int n = sc.nextInt();
String str1 = sc.nextLine();
for (int i = 0; i < n; i++) {
int num = 0;
String str = sc.nextLine();
byte bystr[] = str.getBytes();
for (int j = 0; j < bystr.length; j++) {
if (bystr[j] < 0) {
num++;
}
}
System.out.println(num / 2);
}
}
}
}
杭电 2030 ( 汉字统计 ) java
最新推荐文章于 2021-05-31 14:41:12 发布