- 帖子
- 10
- 积分
- 124
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2009-4-23
|
用到call不好意思
@echo off&setlocal enabledelayedexpansion
for /f "tokens=1* delims=:" %%i in ('type homebook.txt') do set/a h+=1&set s!h!=%%j
:hom
set/p str=str:
echo !time!
set str=!str:-= !
for %%i in (!str!) do (set/a s+=1
if !s!==1 set/a h="(%%i-1)*13"
if !s!==2 set/a h+=%%i+2
if !s!==3 set/a l="(%%i-1)*4*2"
if !s!==4 (set/a l+=%%i*2-1&call set/p=%%s!h!:~!l!,1%%<nul
set/a s=0,h=0,l=0))
echo.&echo.!time!&goto hom
原密文:
17-5-5-1 8-2-2-4 17-10-4-4 9-8-3-1 3-2-5-3 21-7-1-2 15-9-1-3
24-5-3-1 10-5-3-4 28-5-1-2 3-2-5-3 21-7-1-2 7-10-4-4 25-5-4-4
32-1-5-3 31-3-5-3 25-7-1-2 12-2-4-1 3-2-5-1
[ 本帖最后由 qwd 于 2009-11-28 04:03 编辑 ] |
|