hhh这么多华工的么 import java.util.ArrayList; public class flower02 { public static void main(String[] args) { int n = 8456168; ArrayList<Integer> list = new ArrayList<>(); for(int j=n;j<Integer.MAX_VALUE;j++) { list.clear(); int k = Count(j); int temp = j; int sum = 0; for(int a = 0;a<k;a++) { list.add(temp%10); temp = temp/10; } for(Integer s:list) sum+=Math.pow(s, k); if(sum==j&sum>n) { System.out.println(sum); System.exit(0); } } } public static int Count(int n) { int flag = n; int count = 0; while(flag>=1) { flag=flag/10; count++; } return count; } }