youxi01 当前离线
荣誉版主
TOP
随风 当前离线
小竹 当前离线
四级士官
@echo off setlocal enabledelayedexpansion set var=123456789 set /a h1=%random%%%9+1 set var=!var:%h1%=0! for /l %%i in (9,-1,7) do ( set /a temp=!random!%%%%i call set h%%i=%%var:~!temp!,1%% call set var=%%var:!h%%i!=%% ) echo %h1%%h9%%h8%%h7% pause复制代码
评分人数
zhangxiaopeng 当前离线
二级士官
@echo off set ci=4 :start set /a w=%random%%%9+1,y=9 set "var=0 1 2 3 4 5 6 7 8 9" call set "var=%%var:%w%=%%" for /l %%a in (1 1 3) do call :loop if not defined _%w% ( set _%w%=a echo %w% set /a ci-=1 ) if %ci% neq 0 goto start echo\&pause&exit :loop set /a n=%random%%%%y%+1 for /f "tokens=%n%" %%a in ("%var%") do set "m=%%a" set /a "y-=1" set "w=%w%%m%" call set "var=%%var:%m%=%%" goto :eof复制代码