题解 | #提取不重复的整数#
提取不重复的整数
http://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String str = sc.next(); String num = ""; for(int i= str.length() ;i>0;i--){ if(!num.contains(str.substring(i-1,i))){ num += str.substring(i-1,i); }
}
//int num = sc.nextInt();
System.out.print(num);
}
}