题解 | #变种水仙花#
变种水仙花
http://www.nowcoder.com/practice/c178e3f5cc4641dfbc8b020ae79e2b71
#include <bits/stdc++.h> using namespace std; int main(){ int a=10000,b,c,d,e,f; for(a=10000;a<99999;a++){ b=a/10000;c=(a/1000);d=(a/100);e=(a/10);f=a%10; if((b*(a-b10000)+c(a-c1000)+d(a-d100)+e(f))==a) {cout<<a<<' ';
}
} return 0; }