#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
long long int s(long long int n){
long long int sum;
sum=0;
while(n>0)
{
sum+=n%10;
n/=10;
}
return sum;
}
int main()
{
long long n,m,k,r,a,b,c,count=0,i;
long long ans[1000000];
long long int po,num;
cin>>a>>b>>c;
for(i=1;i<=81;i++){
po=(long long int)pow(i,a);
if(po>0&&po<1000000000){
num=b*po+c;
if(num>0&&num<1000000000)
if(s(num)==i)
ans[count++]=num;
}
}
cout<<count<<endl;
for(i=0;i<count;i++)
cout<<ans[i]<<" ";
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+CiNpbmNsdWRlIDxhbGdvcml0aG0+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKbG9uZyBsb25nIGludCBzKGxvbmcgbG9uZyBpbnQgbil7CiAgICBsb25nIGxvbmcgaW50IHN1bTsKICAgIHN1bT0wOwogICAgd2hpbGUobj4wKQogICAgewogICAgICAgIHN1bSs9biUxMDsKICAgICAgICBuLz0xMDsKICAgIH0KICAgIHJldHVybiBzdW07Cn0KCmludCBtYWluKCkKewogICAgbG9uZyBsb25nIG4sbSxrLHIsYSxiLGMsY291bnQ9MCxpOwogICAgbG9uZyBsb25nIGFuc1sxMDAwMDAwXTsKICAgIAogICAgbG9uZyBsb25nIGludCBwbyxudW07CiAgICAKICAgIGNpbj4+YT4+Yj4+YzsKCiAgICBmb3IoaT0xO2k8PTgxO2krKyl7CiAgICAgICAgcG89KGxvbmcgbG9uZyBpbnQpcG93KGksYSk7CiAgICAgICAKICAgICAgICBpZihwbz4wJiZwbzwxMDAwMDAwMDAwKXsKICAgICAgICAgICAgbnVtPWIqcG8rYzsKICAgICAgICBpZihudW0+MCYmbnVtPDEwMDAwMDAwMDApCiAgICAgICAgaWYocyhudW0pPT1pKQogICAgICAgICAgICBhbnNbY291bnQrK109bnVtOwogICAgICAgIH0KICAgICAgICAKICAgIH0KICAgIGNvdXQ8PGNvdW50PDxlbmRsOwogICAgICAgIGZvcihpPTA7aTxjb3VudDtpKyspCiAgICAgICAgY291dDw8YW5zW2ldPDwiICI7CiAgICAKICAgIHJldHVybiAwOwp9