import java.util.*; public class Main { public static void main(String[] args) { Scanner sr=new Scanner(System.in); while(sr.hasNext())//判断是否有输入,若有输入,则返回true { int count1=0,count2=0,count3=0,count4=0; //由于存在多组输入,所以必须在while循环内进行初始化 S...