#include <bits/stdc++.h>
#define _ ios_base::sync_with_stdio(0);cin.tie(0);
#define li long int
#define lli long long int
using namespace std;
lli digitsum(lli x)
{
lli sum=0;
while(x!=0)
{
sum=sum+x%10;
x=x/10;
}
return sum;
}
lli power(lli x, lli a)
{
lli y=1;
while(a!=0)
{
y=y*x;
a--;
}
return y;
}
int main()
{
lli a, b, c, i, x, y, count=0;
lli num[10000];
cin>>a>>b>>c;
for(i=1; i<=72; i++)
{
y=power(i, a)*b+c;
x=digitsum(y);
if(x==i && y<1000000000)
{
num[count]=y;
count++;
}
}
cout<<count<<endl;
for(i=0; i<count; i++)
{
if(i!=count-1) cout<<num[i]<<" ";
else cout<<num[i]<<endl;
}
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNkZWZpbmUgXyBpb3NfYmFzZTo6c3luY193aXRoX3N0ZGlvKDApO2Npbi50aWUoMCk7CiNkZWZpbmUgbGkgbG9uZyBpbnQKI2RlZmluZSBsbGkgbG9uZyBsb25nIGludAoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmxsaSBkaWdpdHN1bShsbGkgeCkKewoJbGxpIHN1bT0wOwoJd2hpbGUoeCE9MCkKCXsKCQlzdW09c3VtK3glMTA7CgkJeD14LzEwOwoJfQoJcmV0dXJuIHN1bTsKfQoKbGxpIHBvd2VyKGxsaSB4LCBsbGkgYSkKewoJbGxpIHk9MTsKCXdoaWxlKGEhPTApCgl7CgkJeT15Kng7CgkJYS0tOwoJfQoJcmV0dXJuIHk7Cn0KCmludCBtYWluKCkKewoJbGxpIGEsIGIsIGMsIGksIHgsIHksIGNvdW50PTA7CglsbGkgbnVtWzEwMDAwXTsKCWNpbj4+YT4+Yj4+YzsKCglmb3IoaT0xOyBpPD03MjsgaSsrKQoJewoJCXk9cG93ZXIoaSwgYSkqYitjOwoJCXg9ZGlnaXRzdW0oeSk7CgkJaWYoeD09aSAmJiB5PDEwMDAwMDAwMDApCgkJewoJCQludW1bY291bnRdPXk7CgkJCWNvdW50Kys7CgkJfQoJfQoKCWNvdXQ8PGNvdW50PDxlbmRsOwoJZm9yKGk9MDsgaTxjb3VudDsgaSsrKQoJewoJCWlmKGkhPWNvdW50LTEpIGNvdXQ8PG51bVtpXTw8IiAiOwoJCWVsc2UgY291dDw8bnVtW2ldPDxlbmRsOwoJfQoJcmV0dXJuIDA7Cn0K