LUCKY10 Why am I getting a wrong answer?

Plz tell me the cases where my program gives incorrect result? http://www.codechef.com/viewsolution/1495767

Try to create test file called test.in with content

3
44
77
7
8
123
456

and test it as it is described in FAQ (http://www.codechef.com/wiki/faq#How_should_I_test_my_program), it returns

77
(empty line)
(empty line)

it should be

77
(empty line)
4
1 Like
//