#D. 水仙花数

    Type: FileIO (flower) 1000ms 256MiB

水仙花数

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

春天是鲜花的季节,水仙花就是其中最迷人的代表,数学上有个水仙花数,他是这样定义的: “水仙花数”是指一个三位数,它的各位数字的立方和等于其本身,比如:153=13+53+33153=1^3+5^3+3^3。 现在要求输出所有在m和n范围内的水仙花数。

输入

两个整数m和n(100mn999100\leq m\leq n\leq 999)。

输出

要求输出所有在给定范围内的水仙花数,就是说,输出的水仙花数必须大于等于m,并且小于等于n,如果有多个,则要求从小到大排列在一行内输出,之间用一个空格隔开; 如果给定的范围内不存在水仙花数,则输出no。

样例输入

300 380

样例输出

370 371

A班第一天测试

Not Attended
Status
Done
Rule
Ledo
Problem
6
Start at
2025-7-21 19:00
End at
2025-7-21 21:00
Duration
2 hour(s)
Host
Partic.
8