import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner input = new Scanner(System.in);
int m = input.nextInt();
int n = input.nextInt();
printWater(m,n);
}
public static void printWater(int m, int n){
int count = 0;
for(int i = m; i <= n; i++){
int digit1 = i % 10;
int digit2 = i / 10 % 10;
int digit3 = i / 100;
int number = (int)(Math.pow(digit1, 3) + Math.pow(digit2, 3) + Math.pow(digit3, 3));
if(number == i){
if(count == 0){
System.out.print(number);
}
else{
System.out.print(" " + number);
}
count++;
}
}
if(count == 0){
System.out.println("no");
}
else{
System.out.println();
}
}
}
2021 春招 水仙花数
最新推荐文章于 2024-07-13 13:55:40 发布