输出由1~9组成和三组三位数,第二组是第一组的2倍,第三组是第一组的3倍,三组数字中无重复数字
//输出由1~9组成和三组三位数,第二组是第一组的2倍,第三组是第一组的3倍,三组数字中无重复数字 for (int i = 123; i <= 333; i++) { int j = i * 2; int k = i * 3; string str = i.ToString() + "," + j.ToString() + "," + k.ToString(); IEnumerable<char> distinct = str.Distinct(); if (distinct.Count() == 10 && str.IndexOf('0') == -1) { Response.Write("<hr/>" + str); } }