本帖最后由 terse 于 2013-1-16 17:40 编辑
再简化一行
一处笔误 貌似没变化- @echo off&setlocal enabledelayedexpansion
- set lp=100
- set /a A=10000,M=1000
- set/aLp=(Lp+3)/4*14
- for /l %%i in (%LP% -1 1) do set/a "S+=M*A,R_%%i=S%%%%i,S/=%%i"
- set /a "E=S/A+M,M=S%%A,Lp-=14"
- set _E=%_E%%E:~,4%
- for /l %%i in (!Lp! -14 1) do (
- for /l %%j in (%%i -1 1) do set/a "S+=R_%%j*A,R_%%j=S%%%%j,S/=%%j"
- set /a "E=S/A+M,M=S%%A+A"
- set _E=!_E!!E:~-4!
- )
- )
- echo;!_E!
- pause
复制代码
|