/*Write a C program to find Strong Numbers from 0 to 1000.
*/
#include<stdio.h>
int main(){
int pro=1,sto,sum=0,count=0,sto2;
for(int i=0;i<=1000;i++){
sto=i;
while(sto!=0){
pro=1;
int digit =sto%10;
for(int j=1;j<=digit;j++){
pro=pro*j;
}
sto=sto/10;
sum=sum+pro;
}
if(sum==i){
count++;
}
}
return 0;
}
LypXcml0ZSBhIEMgcHJvZ3JhbSB0byBmaW5kIFN0cm9uZyBOdW1iZXJzIGZyb20gMCB0byAxMDAwLgoqLwojaW5jbHVkZTxzdGRpby5oPgppbnQgbWFpbigpewogICBpbnQgcHJvPTEsc3RvLHN1bT0wLGNvdW50PTAsc3RvMjsKICAgIGZvcihpbnQgaT0wO2k8PTEwMDA7aSsrKXsKICAgICAgc3RvPWk7CiAgICAgCiAgICB3aGlsZShzdG8hPTApewogICAgICBwcm89MTsKICAgICAgaW50IGRpZ2l0ID1zdG8lMTA7CiAgICAgIAogICAgICBmb3IoaW50IGo9MTtqPD1kaWdpdDtqKyspewogICAgICAgICBwcm89cHJvKmo7CiAgICAgIH0KICAgICAgc3RvPXN0by8xMDsKICAgICAgc3VtPXN1bStwcm87CiAgICAgIAogICAgfQogICAgICBpZihzdW09PWkpewogICAgICAgICBjb3VudCsrOwogICAgICAgICBwcmludGYoIiVkICIsaSk7CiAgICAgIH0KICAgIH0KICAgIHByaW50ZigiXG4lZCIsY291bnQpOwogICAKCiAgICByZXR1cm4gMDsKfQ==