my solution for nhay problem is http://ideone.com/Jf8k26...i cannot understand why it is WA..i guess it has to do something with the input/output..please help me out