public static void Num(){ int[] a={5,6,7,9}; int len=a.length; int count=0; for(int i=0;i<len;i++){ for(int j=0;j<len;j++){ for(int k=0;k<len;k++){ int bai=a[i]; int shi=a[j]; int ge=a[k]; if(bai!=shi&&bai!=ge&&ge!=shi){ System.out.println((bai*100)+(shi*10)+ge); count++; } } } } System.out.println(count); }
标签:数字,自定义,哪些,int,三位数,分别 From: https://www.cnblogs.com/Liku-java/p/16792047.html