ã¾ããããèªç¶æ°ã3æ¡ã®èªç¶æ°å士ã®ç©ã«ãªã£ã¦ãããã©ããã調ã¹ãã³ã¼ããæ¸ãã¾ãããã999ããéé ã«å²ã£ã¦ãã£ã¦ãå²ãåãããç©ã«ãªã£ã¦ãã¾ããå²ãç®ã®çµæãèªå以ä¸ã«ãªã£ããç©ããªããã¨ã«ãªãã¾ãã
:is_product setlocal set /a d = 999 :loop_is_product set /a q = %1 / %d% if %q% GTR %d% exit /b 0 set /a r = %1 %% %d% if %r% == 0 exit /b 1 set /a d -= 1 goto :loop_is_product
次ã«ãåææ°ã«ãªã£ã¦ãããã©ããã調ã¹ãã³ã¼ããæ¸ãã¾ããããããã¯å帰ã§ç°¡åã«æ¸ãã¾ãã
:is_palindromic setlocal if "%1%" == "" exit /b 1 set n=%1 set front=%n:~0,1% set back=%n:~-1% if %front% NEQ %back% exit /b 0 call :is_palindromic %n:~1,-1% exit /b %ERRORLEVEL%
æåã¨æå¾ã®æ°åãä¸è´ãããè¦ã¾ããéã£ã¦ããåææ°ã§ãªããä¸è´ããã°åå¾ã®æ°åãåãé¤ããæ°ãåææ°ãã©ãã調ã¹ã¾ããæ°ããªããªã£ããåææ°ã¨ãããã¨ã«ãªãã¾ãã
ãã®2ã¤ã999999ããé ã«èª¿ã¹ãã°ããã§ãããã ãããã¯æéããããã¾ãã