import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class Aa
{
public static void main(String arg[])throws IOException
{
String str;
int i,j=0,z=0;
int k=0;
char Array[]=new char[100];
BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));
System.out.print("Input an integer:");
str=buf.readLine();
for(i=0;i<str.length();i++)
{
Array [i]=str.charAt(i);
}
for(i=0;i<=str.length();i++)
{
k=0;
z=0;
if(i==str.length())
{
break;
}
for(j=0;j<=str.length();j++)
{
if(Array[i]==Array[j])
k=k+1;
}
for(int n=0;n<=i;n++)
{
if(Array[i]==Array[n])
{
z++;
}
}
if(z==1)
{
System.out.print(Array[i]);
System.out.print(k);
}
}
}
}
小弟自己想的,用FOR来实现