#include int main() { int inputc; int sum[10] = { 0,0,0,0,0,0,0,0,0,0 }; int answer[10]; int counter; answer[0] = 20105; answer[1] = 20063; answer[2] = 19892; answer[3] = 20011; answer[4] = 19874; answer[5] = 20199; answer[6] = 19898; answer[7] = 20163; answer[8] = 19955; answer[9] = 19841; int err, ans; inputc = getc(stdin); sum[inputc-48]++; getc(stdin); counter = 0 ;; while( (inputc = getc(stdin) )!= EOF ) { counter++; if( inputc=='\n' ) { break; } if( counter > 200000 ) { continue; } sum[inputc-48]++; } #ifdef DBG for( int i=0; i<10; i++ ) { printf("[%d]\n %d %d\n", i, sum[i], answer[i]); } #endif for( int i=0; i< 10; i++ ) { if(sum[i]!=answer[i]){ if( sum[i] > answer[i] ) { err = i; } else { ans = i; } } } printf("%d %d\n", err, ans); return 0; }