题解 | #变种水仙花#
变种水仙花
https://www.nowcoder.com/practice/c178e3f5cc4641dfbc8b020ae79e2b71
#include <stdio.h> int main() { int i,j,sum=0; for(i=10000;i<=99999;i++) { for(j=10;j<=10000;j=j*10) { sum=sum+(i/j)*(i%j); } if(sum==i) printf("%d ",i); sum=0; } return 0; }