日期:2014-05-20 浏览次数:20666 次
public class Test { public static void find() { int num = 102,count = 0; int a,b,c;//百,十,个 while(num <= 987){ a = num / 100; b = (num - a * 100) / 10; c = num % 10; if(a != b && a != c && b != c){ System.out.println(num); ++count; } ++num; } System.out.println("count = " + count); } public static void main(String[] args) { find(); } }