0.5秒的要求实在太苛刻了,在我机子上怎么都是接近 1秒
:- @echo off&setlocal enabledelayedexpansion
- set "var= abcdefghijklmnopqrstuvwxyz"
- set "jj=."
- set /a mm=26,max=0,hh=14
- for /l %%a in (1 1 20) do (
- for /l %%b in (1 1 20) do (
- if !mm! equ 0 set mm=1
- set /a ww=!random!%%mm+1
- for %%i in (!ww!) do set ss=!var:~%%i,1!
- set #%%a-%%b=!ss!
- set /a !jj!!ss!+=1
- for %%i in (!jj!!ss!) do set xx=!%%i!
- if !xx! equ !hh! (
- for %%i in (!ss!) do set var=!var:%%i=!
- set /a mm-=1
- )
- if not defined $!ss! (
- set $!ss!=a
- set /a max+=1
- if !max! leq 18 set num=!num!!ss!
- )
- if "!var!"==" " (
- set var= !num!
- set "jj=@"
- set /a mm=18,hh=2
- )
- )
- )
- for /f "tokens=1-2 delims==" %%a in ('set #') do (
- set /a str+=1
- echo %%a=%%b
- set /a tot.%%b+=1
- )
- echo;&echo 共 !str! 个变量
- echo;
- set /p=按回车键检验值是否全是偶数&echo;
- set /a xuh=100
- for /f "tokens=2 delims=." %%a in ('set tot.') do (
- set /a xuh+=1
- echo !xuh:~-2! %%a
- )
- echo;&pause
复制代码
|