摘要: 一道题目,用1,2,....9组成三个三位数abc,def,ghi,每个数字恰好使用一次,要求abc:def:ghi=1:2:3,输出所有解。 这是我的代码:public static void main(String[] args) throws IOException {// TODO Auto-generated method stubint i = 0;for(i = 123 ;3*i set = new HashSet();//此处将abc,efg,hgi的每一位求出放入set中,然后与9比较,来判断其中有没有重复的元素set.add(i%10);set.add... 阅读全文