#include <cmath>
#include <climits>
#include <queue>
#include <vector>
#include <map>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <sstream> // istringstream buffer(myString);
#include <stack>
#include <algorithm>
#include <cstring>
#include <cassert>
//functions in code for optimization
#define max(a,b) (a<b?b:a)
#define min(a,b) (a<b?a:b)
#define abs(x) (x<0?(-x):x)
#define C2I(c) (c-'0')
#define gcd __gcd
//data types used often, but you don't want to type them time by time
#define ll long long
#define ull unsigned long long
#define ui unsigned int
//For Map, pair
#define pb push_back
#define mp make_pair
#define fi first
#define se second
// for debug
#define DBG(vari) cerr<<#vari<<" = "<<(vari)<<endl;
using namespace std;
int check_dig(ll x,int t);
int main()
{
//Your Code Starts here :*
ll mul=0;
ll a,b,c=0;
int counter=0;
cin>>a>>b>>c;
vector<ll> raa;
for(int i=1; i<=81; i++)
{
mul=(b*pow(i,a))+c;
if(check_dig(mul,i))
{
if(mul<1000000000 )
{
counter++;
raa.push_back(mul);
}
}
}
cout<<counter<<endl;
for(int i=0; i!=(int)raa.size(); i++)
cout<<raa[i]<<" ";
return 0;
}
int check_dig(ll x,int t)
{
int sum=0;
while(x>0)
{
sum=sum+x%10;
x=x/10;
}
if(sum==t)
return 1;
else
return 0;
}
I2luY2x1ZGUgPGNtYXRoPgojaW5jbHVkZSA8Y2xpbWl0cz4KI2luY2x1ZGUgPHF1ZXVlPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8bWFwPgojaW5jbHVkZSA8Y3N0ZGxpYj4KI2luY2x1ZGUgPGZzdHJlYW0+CiNpbmNsdWRlIDxpb21hbmlwPgojaW5jbHVkZSA8aW9zdHJlYW0+CiNpbmNsdWRlIDxzc3RyZWFtPiAgLy8gaXN0cmluZ3N0cmVhbSBidWZmZXIobXlTdHJpbmcpOwojaW5jbHVkZSA8c3RhY2s+CiNpbmNsdWRlIDxhbGdvcml0aG0+CiNpbmNsdWRlIDxjc3RyaW5nPgojaW5jbHVkZSA8Y2Fzc2VydD4K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W50ZXIrKzsKICAgICAgICAgICAgICAgIHJhYS5wdXNoX2JhY2sobXVsKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIGNvdXQ8PGNvdW50ZXI8PGVuZGw7CiAgICBmb3IoaW50IGk9MDsgaSE9KGludClyYWEuc2l6ZSgpOyBpKyspCiAgICAgICAgY291dDw8cmFhW2ldPDwiICI7CiAgICByZXR1cm4gMDsKfQppbnQgY2hlY2tfZGlnKGxsIHgsaW50IHQpCnsKICAgIGludCBzdW09MDsKICAgIHdoaWxlKHg+MCkKICAgIHsKICAgICAgICBzdW09c3VtK3glMTA7CiAgICAgICAgeD14LzEwOwogICAgfQogICAgaWYoc3VtPT10KQogICAgICAgIHJldHVybiAxOwogICAgZWxzZQogICAgICAgIHJldHVybiAwOwp9Cg==