招数

import java.util.Scanner;
public class Main
{

public static void main(String[] args)
{
int count;
int count1[];
String use;
Scanner AI=new Scanner(System.in);
Scanner AI1=new Scanner(System.in);

count1=new int[1005];


count=AI.nextInt();
int m=0;
int change;
for(int t=0;t<count;t++)
{
use=AI1.nextLine();
for(int t7=0;t7<30;t7++)
{
count1[t7]=0;
}
//System.out.println();
// use=AI1.nextLine();
for(int t1=0;t1<use.length();t1++)
{
m=0;
change=use.charAt(t1);
for(int t6=65;t6<=90;t6++)
{
if(change==t6)
count1[m]++;
m++;
}
m=0;
for(int t2=97;t2<=122;t2++)
{
// System.out.println(change);

if(change==t2)
{
count1[m]++;
}
m++;
}
}
for(int t3=0;t3<m;t3++)
{
if(count1[t3]!=0)
System.out.printf("%c%d ",t3+97,count1[t3]);
}
System.out.println();

}

}


}

 

posted on 2019-05-12 12:17  AIERSTOM  阅读(153)  评论(0编辑  收藏  举报

导航