#include<bits/stdc++.h>
using namespace std;
int sum(long long int n)
{
int sum,remainder;
while(n != 0)
{
remainder = n % 10;
sum = sum + remainder;
n = n / 10;
}
return sum;
}
long long int p(int base,int exp)
{
long long int ans =1;
for(int i=0; i<exp; i++)
ans=ans*base;
return ans;
}
int main()
{
int a,b,c,s,n=0;
vector<long int> v;
long int x;
cin>>a>>b>>c;
for(int i=1; i<=81; i++)
{
x=b*(p(i,a))+c;
s=sum(x);
if(s==i)
{
n++;
v.push_back(x);
}
}
cout<<n<<endl;
vector<long int> :: iterator it;
for(it=v.begin(); it!=v.end(); it++)
{
cout<<*it<<" ";
}
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKaW50IHN1bShsb25nIGxvbmcgaW50IG4pCnsKICAgIGludCBzdW0scmVtYWluZGVyOwogICAgd2hpbGUobiAhPSAwKQogICB7CiAgICAgIHJlbWFpbmRlciA9IG4gJSAxMDsKICAgICAgc3VtID0gc3VtICsgcmVtYWluZGVyOwogICAgICBuID0gbiAvIDEwOwogICB9CiAgIHJldHVybiBzdW07Cn0KbG9uZyBsb25nIGludCBwKGludCBiYXNlLGludCBleHApCnsKICAgIGxvbmcgbG9uZyBpbnQgYW5zID0xOwogICAgZm9yKGludCBpPTA7IGk8ZXhwOyBpKyspCiAgICAgICAgYW5zPWFucypiYXNlOwogICAgICAgIHJldHVybiBhbnM7Cn0KaW50IG1haW4oKQp7CiAgICBpbnQgYSxiLGMscyxuPTA7CiAgICB2ZWN0b3I8bG9uZyBpbnQ+IHY7CiAgICBsb25nIGludCB4OwogICAgY2luPj5hPj5iPj5jOwogICAgZm9yKGludCBpPTE7IGk8PTgxOyBpKyspCiAgICB7CiAgICAgICAgeD1iKihwKGksYSkpK2M7CiAgICAgICAgcz1zdW0oeCk7CiAgICAgICAgaWYocz09aSkKICAgICAgICB7CiAgICAgICAgICAgIG4rKzsKICAgICAgICAgICAgdi5wdXNoX2JhY2soeCk7CiAgICAgICAgfQoKICAgIH0KCiAgICBjb3V0PDxuPDxlbmRsOwogICAgdmVjdG9yPGxvbmcgaW50PiA6OiBpdGVyYXRvciBpdDsKICAgIGZvcihpdD12LmJlZ2luKCk7IGl0IT12LmVuZCgpOyBpdCsrKQogICAgewogICAgICAgIGNvdXQ8PCppdDw8IiAiOwogICAgfQoKfQ==