题解 | #牛牛的四叶玫瑰数#
牛牛的四叶玫瑰数
https://www.nowcoder.com/practice/b1ee23676ad54919b50aa1a09da1704e
import java.util.*; public class Main { public static void main(String[]args){ Scanner sc=new Scanner(System.in); int a=sc.nextInt(); int b=sc.nextInt(); for(int i=a;i<=b;i++){ int c1=i%10; int c2=i/10%10; int c3=i/100%10; int c4=i/1000; if(i<10000&&i==(Math.pow(c1,4)+Math.pow(c2,4)+Math.pow(c3,4)+Math.pow(c4,4))){ System.out.print(i+" "); } } } }