标签:color data i++ ext int 执行时间 main str for
public static void main(String[] args){
Scanner cin=new Scanner(System.in);int hash[]=new int[256];if (cin.hasNext()){String temp=cin.next();func(temp, hash);}
}
public static void func(String str, int[] hash){
for (int i = 0; i < str.length(); i++){
char c=str.charAt(i);if (hash[c]==0){hash[c]=1;}
}for (int i = 0; i < hash.length; i++){
if (hash[i]!=0){char c=(char)i;System.out.print(c);}
}
}
标签:color data i++ ext int 执行时间 main str for
原文地址:http://www.cnblogs.com/lytwajue/p/6914042.html