You are viewing a single comment's thread. Return to all comments →
I think it is very unnecessary to check if it fits into long. We have x variable in long datatype in the beginning, and also if it fits byte, short and int all the way, it'll definitely fit in long. So you can just print that it fits into long, without checking.
P.S. Why doesn't HackerRank have code formatting?..