Result

AC

Code [DL]

clear all;
for i=0:49
	Ninput=input('');
	A=[00000000 00000001 00000011 00000110 00001010 00001111 00010101 00011100 00100100 00101101 00110111 01000010 01001110 01011011 01101001 01111000 10001000 10011001 10101011 10111110 11010010 11100111 11111101];
	t=0;
	for j=1:23
		if Ninput==A(j)
			t = t + 1;
		endif
	endfor
	if (t > 0)
		disp("1")
	else
		disp("0")
	endif
endfor

stdin

00001100
01011011
00011100
10111110
00010001
00000011
01010111
01000010
01101100
11010110
00011011
10001000
11111101
00001010
10001000
11010010
00001111
10110010
01011111
01100000
11111110
00101101
01100110
10101011
11011000
00000000
01011100
01100001
00010101
00001110
01001110
11100011
00111101
00000000
01011000
00000110
10110110
01111000
01111111
00110111
01101001
10011001
11110001
00000001
10111001
11100111
00100100
10011111
11001010
00001000

stdout

0
1
1
1
0
1
0
1
0
0
0
1
1
1
1
1
1
0
0
0
0
1
0
1
0
1
0
0
1
0
1
0
0
1
0
1
0
1
0
1
1
1
0
1
0
1
1
0
0
0

stderr

octave: X11 DISPLAY environment variable not set
octave: disabling GUI features

strace