0和100显然取。
接下来可以取个位+十位 or 个,十位
分类讨论即可
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<functional>
#include<cmath>
#include<cctype>
using namespace std;
#define For(i,n) for(int i=1;i<=n;i++)
#define Rep(i,n) for(int i=0;i<n;i++)
#define Fork(i,k,n) for(int i=k;i<=n;i++)
#define ForD(i,n) for(int i=n;i;i--)
#define Forp(x) for(int p=pre[x];p;p=next[p])
#define RepD(i,n) for(int i=n;i>=0;i--)
#define MAXN (100+10)
int n,ans[MAXN],size=0;
bool b1=0,b2=0;
int main()
{
// freopen(".in","r",stdin);
// freopen(".out","w",stdout);
scanf("%d",&n);
int p=0;
For(i,n)
{
int a;
scanf("%d",&a);
if (!a||a==100) ans[++size]=a;
else if (a<10&&!b1) b1=1,ans[++size]=a;
else if (!(a%10)&&!b2) b2=1,ans[++size]=a;
else p=a;
}
if (!b1&&!b2&&p) ans[++size]=p;
cout<<size<<endl;
For(i,size-1) cout<<ans[i]<<' ';cout<<ans[size]<<endl;
return 0;
}