#include <bits/stdc++.h>
using namespace std;
#define ll long long
/*ll powt(ll x, ll y)
{
if( y == 0)
return 1;
else if (y%2 == 0)
return powt(x, y/2)*powt(x, y/2);
else
return x*powt(x, y/2)*powt(x, y/2);
}
*/
long long coun(long long num){
long long ans=0;
while(num){
ans = ans+(num%10);
num/=10;
}
return ans;
}
int main(){
long long a,b,c;
cin>>a>>b>>c;
long long d[100000];
int count=0;
for(long long i=1;i<=81;++i){
long long num =b*((long long)(powt(i,a))) + c;
if(num>=1&&num<1000000000){
//cout<<coun(num)<< " "<<i<<" "<<num<<endl;
if(coun(num)==i){
d[count++] = num;
}
}
}
cout<<count<<endl;
for(int i=0;i<count;++i)
cout<<d[i]<<" ";
cout<<endl;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKI2RlZmluZSBsbCBsb25nIGxvbmcKLypsbCBwb3d0KGxsIHgsIGxsIHkpCnsKICAgIGlmKCB5ID09IDApCiAgICAgICAgcmV0dXJuIDE7CiAgICBlbHNlIGlmICh5JTIgPT0gMCkKICAgICAgICByZXR1cm4gcG93dCh4LCB5LzIpKnBvd3QoeCwgeS8yKTsKICAgIGVsc2UKICAgICAgICByZXR1cm4geCpwb3d0KHgsIHkvMikqcG93dCh4LCB5LzIpOwoKfQoqLwpsb25nIGxvbmcgY291bihsb25nIGxvbmcgbnVtKXsKICAgICAgICBsb25nIGxvbmcgYW5zPTA7CiAgICAgICAgd2hpbGUobnVtKXsKICAgICAgICAgICAgICAgIGFucyA9IGFucysobnVtJTEwKTsKICAgICAgICAgICAgICAgIG51bS89MTA7CiAgICAgICAgfQogICAgICAgIHJldHVybiBhbnM7Cn0KCmludCBtYWluKCl7CiAgICAgICAgbG9uZyBsb25nIGEsYixjOwogICAgICAgIGNpbj4+YT4+Yj4+YzsKICAgICAgICBsb25nIGxvbmcgZFsxMDAwMDBdOwogICAgICAgIGludCBjb3VudD0wOwoKICAgICAgICBmb3IobG9uZyBsb25nIGk9MTtpPD04MTsrK2kpewogICAgICAgICAgICAgICAgbG9uZyBsb25nIG51bSA9YiooKGxvbmcgbG9uZykocG93dChpLGEpKSkgKyBjOwoKICAgICAgICAgICAgICAgIGlmKG51bT49MSYmbnVtPDEwMDAwMDAwMDApewogICAgICAgICAgICAgICAgICAgICAgICAvL2NvdXQ8PGNvdW4obnVtKTw8ICIgIjw8aTw8IiAiPDxudW08PGVuZGw7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNvdW4obnVtKT09aSl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZFtjb3VudCsrXSA9IG51bTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgY291dDw8Y291bnQ8PGVuZGw7CiAgICAgICAgZm9yKGludCBpPTA7aTxjb3VudDsrK2kpCiAgICAgICAgICAgICAgICBjb3V0PDxkW2ldPDwiICI7CiAgICAgICAgY291dDw8ZW5kbDsKfQ==