回复 18楼 Susake
不是第二个数是第一个最小数的2倍,而是第三个最大的数,是第二个数的2倍。
回复 16楼 扬州笑哈哈
这是怎么列举的。。不懂
#include <stdio.h> int main ( void ) { int s[10] ; int a, b, c, i, j, k, t ; for ( i = 4; i < 10; i++ ) { for ( j = 1; j < 10; j++ ) { if ( j == i ) continue ; for ( k = 1; k < 10; k++ ) { if ( k == i || k == j ) continue ; a = i * 100 + j * 10 + k ; if ( a % 2 == 0 && a % 3 == 0 ) { for ( t = 1; t < 10; t++ ) s[t] = 0 ; b = a / 2; c = a / 3 ; s[i] = s[j] = s[k] = 1; s[b / 100] = s[b / 10 % 10] = s[b % 10] = 1 ; s[c / 100] = s[c / 10 % 10] = s[c % 10] = 1 ; for ( t = 1; t < 10; t++ ) if ( s[t] == 0 ) break ; if ( t == 10 ) printf ( "a = %d, b = %d, c = %d\n", a, b, c ) ; } } } } return 0 ; }