int cnt[] = {20104, 20063, 19892, 20011, 19874, 20199, 19898, 20163, 19956, 19841}; { int c; --cnt[getchar()-'0'];getchar(); while (0<=(c=getchar())){ --cnt[c-'0']; } int l,h; rep(i,10){if(cnt[i]<0)l=i;if(cnt[i]>0)h=i;} wt(h,l); }