MasaNvi


私信TA

用户名:MasaNvi

访问量:16930

签 名:

不让他人扰乱你的道路,不让冲动毁了你的前程!

等  级
排  名 181
经  验 6651
参赛次数 13
文章发表 26
年  龄 0
在职情况 学生
学  校 海南师范大学
专  业 计算机科学与技术

  自我简介:

解题思路:

注意事项:

参考代码:

#include<iostream>
#include<cstring>
#include<cmath>
using namespace std;
int main()
{
	int m,n;
	while(scanf("%d %d",&m,&n)!=EOF)
	{
		//The min number is 370,so if number less than 370 to not pass
		if(n<153)
			cout<<"no";
		else
		for(int i=m;i<=n;i++)
		{
			int g,s,b;
			g=i%10;
			s=i/10%10;
			b=i/100;
			if(pow(g,3)+pow(s,3)+pow(b,3)==i)
				cout<<i<<" ";
		}
		cout<<endl;
	}
	return 0;
}


 

0.0分

1 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区