【SWOSTOJ】1002:水仙の花数(入門)
Time Limit:
1000MS Memory Limit:
65536KB
Total Submit: 174 Accepted: 25 Page View:
8070
原題リンク
Description
Input
Output
Sample Input Raw
Sample Output Raw
Source
1000MS Memory Limit:
65536KB
Total Submit: 174 Accepted: 25 Page View:
8070
原題リンク
Description
, , , :
“ ” , , :153=1^3+5^3+3^3。
m n 。
Input
, , m n(100<=m<=n<=999), 0 0 ( )。
Output
, , , m, n, , , ;
, no;
。
Sample Input
100 120
300 380
0 0
Sample Output
no
370 371
Source
#include
using namespace std;
int main()
{
int m,n;
while(cin>>m>>n&&m||n)
{
int t=0;
for(int i=m;i<=n;i++)
{
if((i%10)*(i%10)*(i%10)+(i/10%10)*(i/10%10)*(i/10%10)+(i/100)*(i/100)*(i/100)==i)
{
if(t!=0)
{cout<