#Lutece1841. puzzle
puzzle
Migrated from Lutece 1841 puzzle
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
首先请解以下谜题:车下的数字是什么?
正确的答案是87 。这道题对小龙大犇来说太轻松了,于是他想加强难度来考考你:对于给定的长度N,能否获得刚好长度为N的数列,使数列中的每个数经过翻转恰好是连续的数,如N==3时,数列 11 01 60 是合法的。数字的翻转符合以下规定:1、0、8翻转后是其本身;6和9翻转后互相转变;其他数字翻转后不合法;一位数将默认有前导零;只考虑一位或两位正整数。
Input
一行一个数字N(N<=99)
Output
如果能,输出“YES”;否则输出“XLSB”;
Samples
3
YES
Resources
每周一题div2