日期:2014-05-20 浏览次数:20790 次
int n1;
int n2;
int n3;
for (int i = 123456789; i <= 333333333; i = i + 3)
{
char[] num = i.ToString().ToCharArray();
Array.Sort(num);
if (new string(num) == "123456789")
{
n1 = i / 1000000;
n2 = (i - n1 * 1000000)/1000;
n3 = i % 1000;
if (n2 / (double)n1 == 2 && n3 / (double)n1 == 3)
Console.WriteLine(n1 + " " + n2 + " " + n3);
}
}