xxx3212 当前离线
六级士官
for /l %%a in (1,1,100) do ( set error=0 for /l %%b in (1,1,100) do ( if not %%a==%%b if !n%%a!==!n%%b! set error=1 if !error!==1 echo %%a和%%b重复! ) )复制代码
liuchong.net 当前离线
一级士官
TOP
dahual 当前离线
中校
@echo off & setlocal enabledelayedexpansion for /l %%a in (1,1,100) do set ".!random!-%%a=%%a" for /f "tokens=2 delims==" %%a in ('set .') do set /p=%%a<nul & echo. pause>nul复制代码
netbenton (秋风夜雨)当前离线
荣誉版主
@echo off & setlocal enabledelayedexpansion for /l %%i in (1 1 100) do set num%%i=%%i for /l %%i in (100 -1 1) do ( set /a rnd=!random!%%%%i+1,n+=1 for %%a in (!rnd!) do echo !n!=!num%%a!&set/a num!rnd!=num%%i ) pause>nul复制代码
youxi01 当前离线
随风 当前离线
@echo off & setlocal enabledelayedexpansion for /l %%i in (1 1 100) do set num%%i=%%i for /l %%i in (1 1 100) do ( set /a rnd=100!random:~-2!%%100+1,var=!num%%i! call set num%%i=%%num!rnd!%% set num!rnd!=!var! ) for /l %%i in (1 1 100) do if "%%i"=="!num%%i!" echo %%i=!num%%i! pause 复制代码
foxJL 当前离线
@echo off & setlocal enabledelayedexpansion for /l %%i in (1 1 100) do set num%%i=%%i for /l %%i in (1 1 100) do ( set /a rnd=100!random:~-2!%%100+1,var=!num%%i! call set num%%i=%%num!rnd!%% set num!rnd!=!var! ) for /l %%i in (1 1 100) do echo %%i=!num%%i! pause>nul复制代码
@echo off&setlocal enabledelayedexpansion for /l %%i in (1,1,100) do (call :ran %%i&echo %%i=!%%i!) pause>nul&exit :ran set /a n=%random% %% 101 if %n% equ 0 (goto ran) else ( if !z%n%! equ 0 ( if %n% equ %1 (goto ran) else ( set %1=%n%&set /a z%n%+=1 ) ) else (goto ran) ) goto :eof复制代码
评分人数