|
|||
HeadstandDuring the sweaty programming hours it is important to remember the importance of physical activity. But oh, my...how many lines of code we are wasting just by going to the gym?! I know! What if instead of us only the computer moves, and we just watch? Hm, yes, this will do it. Our task is to move our stiff necks by rotating numbers with 180 degrees. More precisely: we call a number an upside down number if it looks the same (on a "classic digital counter") as the original after rotating it 180 degrees. A few examples for such numbers: 181, 80108 or 69. Your task is to decide if a given number is an upside down number or not. InputThe input is a single non-negative integer n. OutputThe output is True if n is an upside down number or False otherwise. Restrictions
Example |
|||
University of Debrecen; Faculty of Informatics; v. 09/30/2024 |