神剑山庄资源网 Design By www.hcban.com
a.txt
1##4072.0###52.19### #72## #
2#38705.8# # # 51.73## #70# #
372###389.0##51.80##19.77# # 72#####
4##59.71#3715.45##71######
以#和空格作为分隔符,最后一列的数值乘以7,其他不变。
已知的条件,数字是随机的,最末列的数值是整数,即使乘以7,仍在CMD所能计算范围内。
#与空格与“.”的位置和数量与每行的列数都是随机的。
输出如下:
1##4072.0###52.19### #504## #
2#38705.8# # # 51.73## #490# #
372###389.0##51.80##19.77# # 504#####
4##59.71#3715.45##497######
只是对最末列的数值进行运算操作,其他不变。
要求通用,高效。
ieutk:
复制代码 代码如下:
@echo off&setlocal enabledelayedexpansion
for /f "usebackq skip=35 delims=" %%a in ("%~dpnx0") do (
set "var=%%a"
set "e="
set "m=0"
set /a num+=1
call :is "%%a"
)
for /l %%a in (1 1 %num%) do echo.!_str1%%a!!_num%%a!!_str2%%a!
pause
goto :eof
:is
set "str=%~1"
if "%var:~-1%" lss "0" (
set "e=%var:~-1%!e!"
set "var=%var:~0,-1%"&set /a m+=1
goto is
)
set "_str2%num%=%e%
set "_strn%num%=!str:~0,-%m%!"
call :su "!_strn%num%!"
goto :eof
:su
set "a="
set "u=%~1"
set "y=0"
:st
for /l %%a in (0 1 9) do if "%u:~-1%"=="%%a" set "a=%u:~-1%!a!"&set /a y+=1
set "u=%u:~0,-1%"
for /l %%a in (0 1 9) do if "%u:~-1%"=="%%a" goto :st
set /a x+=1
set "_num%x%=%a%"
set /a _num%num%*=7
set "_str1%x%=!_strn%x%:~0,-%y%!"
goto :eof
1##4072.0###52.19### #504## #
2#38705.8# # # 51.73## #490# #
372###389.0##51.80##19.77# # 504#####
4##59.71#3715.45##497######
5##4072.0###52.19### #72## #
6#38705.8# # # 51.73## #70# #
772###389.0##51.80##19.77# # 72#####
8##59.71#3715.45##71######
terse:
复制代码 代码如下:
@echo off&setlocal enabledelayedexpansion
for /l %%i in (0 1 9) do set %%i=%%i
for /f "delims=" %%i in (1.txt) do set "str=%%i"&call:lp
pause&goto :eof
:lp
set/a n+=1
set var=!str:~-%n%,1!
if defined !var! (set str2=!var!!str2!&set lp=lp) else (
if not defined lp (set str1=!var!!str1!) else (
set/a str2*=7&set str=!str:~,-%n%!!var!!str2!!str1!
b.txt echo !str!
for %%i in (str1 str2 n lp) do set %%i=
goto :eof
))
goto lp
youxi01:
复制代码 代码如下:
@echo off 2>nul 3>nul
setlocal enabledelayedexpansion
for /f "delims=" %%a in (list.txt) do (
set /a n=0
set var=%%a
set var=!var:#= !
for %%i in (!var!) do set res=%%i
Rem '/*处理浮点///
set /a ok=!res! && (set /a res=!res!*7) || (set var=!res:*.=!
for /l %%i in (0 1 9) do set var=!var:%%i= %%i!
for %%i in (!var!) do set/a n+=1
set res=!res:.=!
set /a res=!res!*7
call set res=%%res:~0,-!n!%%.%%res:~-!n!%%)
echo !res!
)
pause>nul
huahua0919:
方法一:(用时0.25~0.30秒)
复制代码 代码如下:
@echo off&setlocal enabledelayedexpansion
for /f "delims=" %%i in (LastNumberChange.txt) do set/a n+=1&set LastLine=$%%i$
for /f "delims=" %%i in (LastNumberChange.txt) do (
set/a m+=1
if %n% neq !m! call set "all=!all!%%i&echo."
)
:start
set FirstNumber=%LastLine:~,1%
set "all1=!all1!%FirstNumber%"
set LastLine=%LastLine:~1%
echo %LastLine%|findstr "[0-9]" >nul&&goto :start
:all1
set /a t+=1
call set LastOne=%%all1:~-!t!%%
set/a x=LastOne*1
if "%LastOne%"=="%x%" goto :all1
set/a LastOne=%LastOne:~1%*7
set /a t-=1
set xlm=!all1:~,-%t%!
Set "Sum=%all%%xlm%%LastOne%%LastLine%"
echo %Sum:$=%
pause
方法二:(用时0.02~0.05秒)
复制代码 代码如下:
@echo off&setlocal enabledelayedexpansion
for /f "delims=" %%i in (LastNumberChange.txt) do set/a n+=1&set LastLine=$%%i$
for /f "delims=" %%i in (LastNumberChange.txt) do (
set/a m+=1
if %n% neq !m! call set "all=!all!%%i&echo."
)
:LastOne
set/a x+=1
call set LastOne=%%LastLine:~-!x!,1%%
set /a Mult=%LastOne%*1
if not "%Mult%"=="%LastOne%" goto :LastOne
set/a x-=1
call set Front=%%LastLine:~,-%x%%%
call set Last=%%LastLine:~-%x%%%
:Middle
set/a x1+=1
call set LastOne1=%%Front:~-!x1!%%
set /a Mult1=%LastOne1%*1
if "%Mult1%"=="%LastOne1%" goto :Middle
set/a Middle=%LastOne1:~1%*7
set/a x1-=1
call set Front=%%Front:~,-%x1%%%
set "Sum=%all%%Front%%Middle%%Last%"
echo %Sum:$=%
pause
batman:
复制代码 代码如下:
@echo off
for /f "delims=" %%i in (1.txt) do (
set "str=%%i"&set "begin=a"
setlocal enabledelayedexpansion
call :lp
echo !str!!a!!var!!last!
endlocal
)
pause>nul&goto :eof
:lp
set "a=%str:~-1%"&set "str=%str:~,-1%"
if "%a%" geq "0" (
if "%a%" leq "9" set "flag=a"&set "begin="
)
if defined flag (
set var=%a%!var!&set "flag="
) else (
if defined begin (
set last=%a%!last!
) else (
set /a var*=7&goto :eof
)
)
goto lp
随风:
复制代码 代码如下:
@echo off&setlocal EnableDelayedExpansion
for /l %%a in (0 1 9) do set .%%a=%%a
for /f "delims=" %%a in (a.txt) do (
set flag=&set num=&set sun=&set "str=%%a"
call :loop
)
pause
:loop
set "var=!str:~-1!"
if defined .!var! (set num=!var!!num!&set flag=a) else (set sun=!var!!sun!&set flag=)
if not defined num set str=!str:~0,-1!&goto loop
if defined flag set str=!str:~0,-1!&goto loop
set /a num*=7
echo !str!!num!!sun:~1!
goto:eof
1##4072.0###52.19### #72## #
2#38705.8# # # 51.73## #70# #
372###389.0##51.80##19.77# # 72#####
4##59.71#3715.45##71######
以#和空格作为分隔符,最后一列的数值乘以7,其他不变。
已知的条件,数字是随机的,最末列的数值是整数,即使乘以7,仍在CMD所能计算范围内。
#与空格与“.”的位置和数量与每行的列数都是随机的。
输出如下:
1##4072.0###52.19### #504## #
2#38705.8# # # 51.73## #490# #
372###389.0##51.80##19.77# # 504#####
4##59.71#3715.45##497######
只是对最末列的数值进行运算操作,其他不变。
要求通用,高效。
ieutk:
复制代码 代码如下:
@echo off&setlocal enabledelayedexpansion
for /f "usebackq skip=35 delims=" %%a in ("%~dpnx0") do (
set "var=%%a"
set "e="
set "m=0"
set /a num+=1
call :is "%%a"
)
for /l %%a in (1 1 %num%) do echo.!_str1%%a!!_num%%a!!_str2%%a!
pause
goto :eof
:is
set "str=%~1"
if "%var:~-1%" lss "0" (
set "e=%var:~-1%!e!"
set "var=%var:~0,-1%"&set /a m+=1
goto is
)
set "_str2%num%=%e%
set "_strn%num%=!str:~0,-%m%!"
call :su "!_strn%num%!"
goto :eof
:su
set "a="
set "u=%~1"
set "y=0"
:st
for /l %%a in (0 1 9) do if "%u:~-1%"=="%%a" set "a=%u:~-1%!a!"&set /a y+=1
set "u=%u:~0,-1%"
for /l %%a in (0 1 9) do if "%u:~-1%"=="%%a" goto :st
set /a x+=1
set "_num%x%=%a%"
set /a _num%num%*=7
set "_str1%x%=!_strn%x%:~0,-%y%!"
goto :eof
1##4072.0###52.19### #504## #
2#38705.8# # # 51.73## #490# #
372###389.0##51.80##19.77# # 504#####
4##59.71#3715.45##497######
5##4072.0###52.19### #72## #
6#38705.8# # # 51.73## #70# #
772###389.0##51.80##19.77# # 72#####
8##59.71#3715.45##71######
terse:
复制代码 代码如下:
@echo off&setlocal enabledelayedexpansion
for /l %%i in (0 1 9) do set %%i=%%i
for /f "delims=" %%i in (1.txt) do set "str=%%i"&call:lp
pause&goto :eof
:lp
set/a n+=1
set var=!str:~-%n%,1!
if defined !var! (set str2=!var!!str2!&set lp=lp) else (
if not defined lp (set str1=!var!!str1!) else (
set/a str2*=7&set str=!str:~,-%n%!!var!!str2!!str1!
b.txt echo !str!
for %%i in (str1 str2 n lp) do set %%i=
goto :eof
))
goto lp
youxi01:
复制代码 代码如下:
@echo off 2>nul 3>nul
setlocal enabledelayedexpansion
for /f "delims=" %%a in (list.txt) do (
set /a n=0
set var=%%a
set var=!var:#= !
for %%i in (!var!) do set res=%%i
Rem '/*处理浮点///
set /a ok=!res! && (set /a res=!res!*7) || (set var=!res:*.=!
for /l %%i in (0 1 9) do set var=!var:%%i= %%i!
for %%i in (!var!) do set/a n+=1
set res=!res:.=!
set /a res=!res!*7
call set res=%%res:~0,-!n!%%.%%res:~-!n!%%)
echo !res!
)
pause>nul
huahua0919:
方法一:(用时0.25~0.30秒)
复制代码 代码如下:
@echo off&setlocal enabledelayedexpansion
for /f "delims=" %%i in (LastNumberChange.txt) do set/a n+=1&set LastLine=$%%i$
for /f "delims=" %%i in (LastNumberChange.txt) do (
set/a m+=1
if %n% neq !m! call set "all=!all!%%i&echo."
)
:start
set FirstNumber=%LastLine:~,1%
set "all1=!all1!%FirstNumber%"
set LastLine=%LastLine:~1%
echo %LastLine%|findstr "[0-9]" >nul&&goto :start
:all1
set /a t+=1
call set LastOne=%%all1:~-!t!%%
set/a x=LastOne*1
if "%LastOne%"=="%x%" goto :all1
set/a LastOne=%LastOne:~1%*7
set /a t-=1
set xlm=!all1:~,-%t%!
Set "Sum=%all%%xlm%%LastOne%%LastLine%"
echo %Sum:$=%
pause
方法二:(用时0.02~0.05秒)
复制代码 代码如下:
@echo off&setlocal enabledelayedexpansion
for /f "delims=" %%i in (LastNumberChange.txt) do set/a n+=1&set LastLine=$%%i$
for /f "delims=" %%i in (LastNumberChange.txt) do (
set/a m+=1
if %n% neq !m! call set "all=!all!%%i&echo."
)
:LastOne
set/a x+=1
call set LastOne=%%LastLine:~-!x!,1%%
set /a Mult=%LastOne%*1
if not "%Mult%"=="%LastOne%" goto :LastOne
set/a x-=1
call set Front=%%LastLine:~,-%x%%%
call set Last=%%LastLine:~-%x%%%
:Middle
set/a x1+=1
call set LastOne1=%%Front:~-!x1!%%
set /a Mult1=%LastOne1%*1
if "%Mult1%"=="%LastOne1%" goto :Middle
set/a Middle=%LastOne1:~1%*7
set/a x1-=1
call set Front=%%Front:~,-%x1%%%
set "Sum=%all%%Front%%Middle%%Last%"
echo %Sum:$=%
pause
batman:
复制代码 代码如下:
@echo off
for /f "delims=" %%i in (1.txt) do (
set "str=%%i"&set "begin=a"
setlocal enabledelayedexpansion
call :lp
echo !str!!a!!var!!last!
endlocal
)
pause>nul&goto :eof
:lp
set "a=%str:~-1%"&set "str=%str:~,-1%"
if "%a%" geq "0" (
if "%a%" leq "9" set "flag=a"&set "begin="
)
if defined flag (
set var=%a%!var!&set "flag="
) else (
if defined begin (
set last=%a%!last!
) else (
set /a var*=7&goto :eof
)
)
goto lp
随风:
复制代码 代码如下:
@echo off&setlocal EnableDelayedExpansion
for /l %%a in (0 1 9) do set .%%a=%%a
for /f "delims=" %%a in (a.txt) do (
set flag=&set num=&set sun=&set "str=%%a"
call :loop
)
pause
:loop
set "var=!str:~-1!"
if defined .!var! (set num=!var!!num!&set flag=a) else (set sun=!var!!sun!&set flag=)
if not defined num set str=!str:~0,-1!&goto loop
if defined flag set str=!str:~0,-1!&goto loop
set /a num*=7
echo !str!!num!!sun:~1!
goto:eof
标签:
文本
神剑山庄资源网 Design By www.hcban.com
神剑山庄资源网
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
神剑山庄资源网 Design By www.hcban.com
暂无文本最末列数值乘一个数的批处理实现的评论...
《魔兽世界》大逃杀!60人新游玩模式《强袭风暴》3月21日上线
暴雪近日发布了《魔兽世界》10.2.6 更新内容,新游玩模式《强袭风暴》即将于3月21 日在亚服上线,届时玩家将前往阿拉希高地展开一场 60 人大逃杀对战。
艾泽拉斯的冒险者已经征服了艾泽拉斯的大地及遥远的彼岸。他们在对抗世界上最致命的敌人时展现出过人的手腕,并且成功阻止终结宇宙等级的威胁。当他们在为即将于《魔兽世界》资料片《地心之战》中来袭的萨拉塔斯势力做战斗准备时,他们还需要在熟悉的阿拉希高地面对一个全新的敌人──那就是彼此。在《巨龙崛起》10.2.6 更新的《强袭风暴》中,玩家将会进入一个全新的海盗主题大逃杀式限时活动,其中包含极高的风险和史诗级的奖励。
《强袭风暴》不是普通的战场,作为一个独立于主游戏之外的活动,玩家可以用大逃杀的风格来体验《魔兽世界》,不分职业、不分装备(除了你在赛局中捡到的),光是技巧和战略的强弱之分就能决定出谁才是能坚持到最后的赢家。本次活动将会开放单人和双人模式,玩家在加入海盗主题的预赛大厅区域前,可以从强袭风暴角色画面新增好友。游玩游戏将可以累计名望轨迹,《巨龙崛起》和《魔兽世界:巫妖王之怒 经典版》的玩家都可以获得奖励。
更新日志
2024年11月17日
2024年11月17日
- 中国武警男声合唱团《辉煌之声1天路》[DTS-WAV分轨]
- 紫薇《旧曲新韵》[320K/MP3][175.29MB]
- 紫薇《旧曲新韵》[FLAC/分轨][550.18MB]
- 周深《反深代词》[先听版][320K/MP3][72.71MB]
- 李佳薇.2024-会发光的【黑籁音乐】【FLAC分轨】
- 后弦.2012-很有爱【天浩盛世】【WAV+CUE】
- 林俊吉.2012-将你惜命命【美华】【WAV+CUE】
- 晓雅《分享》DTS-WAV
- 黑鸭子2008-飞歌[首版][WAV+CUE]
- 黄乙玲1989-水泼落地难收回[日本天龙版][WAV+CUE]
- 周深《反深代词》[先听版][FLAC/分轨][310.97MB]
- 姜育恒1984《什么时候·串起又散落》台湾复刻版[WAV+CUE][1G]
- 那英《如今》引进版[WAV+CUE][1G]
- 蔡幸娟.1991-真的让我爱你吗【飞碟】【WAV+CUE】
- 群星.2024-好团圆电视剧原声带【TME】【FLAC分轨】