题解 | #变种水仙花#
变种水仙花
https://www.nowcoder.com/practice/c178e3f5cc4641dfbc8b020ae79e2b71
#include <stdio.h> int main() { int a,b,c,d,e,f,g,h; int t; for (t=10000;t<=99999 ; t++) { a=t/10000; b=t%10000; c=t/1000; d=t%1000; e=t%100; f=t/100; g=t%10; h=t/10; if (t==(a*b+c*d+e*f+g*h)) printf("%d ",t); } return 0; }