第1个回答 2012-04-21
#include <iostream>
using namespace std;
void Exch2Data(char& item1,char& item2)
{
char tmp = item1;
item1 = item2;
item2 = tmp;
}
void Permutation(char* str,int l,int r)
{
static int Max = 0;
if(l==r)
{
int a = 10 * (str[0] - '0') + (str[1] - '0');
int b = 10 * (str[2] - '0') + (str[3] - '0');
int c = 10 * (str[4] - '0') + (str[5] - '0');
int d = 10 * (str[6] - '0') + (str[7] - '0');
int s = a * b *c + d;
if ( s > Max)
{
cout
<< a << " * "
<< b << " * "
<< c << " + "
<< d << " = "
<< s << endl;
Max = s;
}
}
else
{
for(int i=l;i<=r;++i)
{
Exch2Data(str[l],str[i]);
Permutation(str,l+1,r);
Exch2Data(str[i],str[l]);
}
}
}
int main()
{
char str[]="0123456789";
Permutation(str,0,9);
cout << endl;
}
用全排列算法求解,最后结果为:
76 * 85 * 94 + 32 = 607272
故 "厚德" 为: 32
第2个回答 2012-04-13
在易经中的乾坤也即是阴阳,厚德即为坤的秉性,所谓无论人多么邪恶或者混蛋,当葬入大地的时候,大地都会接受,没人说葬到天上就是这个原因。
天行健,君子以自强不息!!即为乾,要生生不息向外扩张壮大!!
地势坤,君子以厚德载物!!即为坤,要能够厚德包容!!
您也说到了,在乾卦中之所以有六爻都为阳爻就是九五为至尊,九六就龙战于野,其血玄黄!!
并且9也是数字中最大的数字,任何数字综合相加加到最后两位时,9总是最大!(例:379,3+7+9=19,1+9=0,0也是数字的基数)
希望朋友你看到了满意!!