4 条题解
-
1
Infinity_ LV 8 @ 10 个月前
答案:153 370 371 407
-
03 年前@
#include<bits/stdc++.h>
using namespace std;
int main()
{
int x,a,b,c;
for(x=100;x<=999;x++)
{
a=x/100;
b=(x-a*100)/10;
c=x%10;
if(a*a*a+b*b*b+c*c*c==x)
cout<<x<<" ";}
return 0;
} -
03 年前@
#include<iostream>
#include<cmath>
#include<iomanip>
using namespace std;
int main()
{
int x,a,b,c;
for(x=100;x<=999;x++)
{
a=x/100;
b=(x-a*100)/10;
c=x%10;
if(a*a*a+b*b*b+c*c*c==x)
cout<<x<<" ";}
return 0;
} -
-12 年前@
#include<iostream>
using namespace std;int main()
{
int num = 100;
do
{
int a = 0;
int b = 0;
int c = 0;
a = num % 10;
b = num / 10 % 10;
c = num / 100;
if (a*a*a + b*b*b + c*c*c == num)
{
cout << num << " ";
}
num++;
} while (num < 1000);
cout << endl;
system("pause");
return 0;
}
- 1
信息
- ID
- 1044
- 难度
- 4
- 分类
- (无)
- 标签
- 递交数
- 300
- 已通过
- 127
- 通过率
- 42%
- 上传者