只写个找相同项的演示代码- @echo off&setlocal enabledelayedexpansion
- for /l %%a in (1,1,50) do (
- set nums=!nums! %%a
- set _%%a=### !random:~-1! ### ### !random:~-1! ###
- )
-
- for /l %%a in (1,1,50) do (
- set nums=!nums: %%a=!
- set yn=%%a列
- for %%b in (!nums!) do (
- if "!_%%a!" equ "!_%%b!" (
- set nums=!nums: %%b=!
- set yn=!yn! %%b列
- )
- )
- if "!yn!" neq "%%a列" (
- echo; !yn! 相同,内容为:
- echo;!_%%a!
- echo;
- )
- )
复制代码
|