#include <iostream>
using namespace std;
void main()
{
int m[123456]={0};
int j = 0;
int b = 0;
for (int i = 1;i <= 123456;i++)
{
if ((i%7)==0)
{
m[j] = i;
j++;
}
}
for (int a = 0;a <=1;a++)
{
for (int b = 0;b <= 2;b++)
{
for (int c = 0;c <=3;c++)
{
for (int d = 0;d <=4;c++)
{
for (int e = 0;e <=5;e++)
{
int s = (100000*a+10000*b+1000*c+100*d+10*e+7);
m[j] = s;
j++;
}
}
}
}
}
for (int g = 0;g < 123456;g++)
{
if (m[g]!=0)
{
b++;
}
}
int s = 0;
for (int n = 0;n <= b;n++)
{
s = s + m[n];
}
cout << s << endl;
}
运行无结果啊!