给出我最开始的解(想出题目后自己第一想到的思路):- @echo off&setlocal enabledelayedexpansion
- set "days=31"
- for %%a in (1 3 5 7 8 10 12 4 6 9 11) do (
- if %%a equ 4 set /a days-=1
- set /a _%%a=days
- )
- for /l %%a in (1,1,100) do (
- set /a a=!random!%%10,b=!random!%%12+1,ys=a%%4,_2=28
- if !ys! equ 0 set /a _2=29
- set /a c=!random!%%_!b!+1
- echo 200!a!-!b!-!c!
- )
- pause>nul
复制代码
|