- @echo off
- setlocal enabledelayedexpansion
- set idbox=1509231988042396?9;3700001989091894?0;4313021981042877?1;5301021920050801?X;6110251990062874?0
- set muli=7 、9 、10 、5 、8 、4 、2 、1 、6 、3 、7 、9 、10 、5 、8 、4 、2
- set idbox=%idbox:?=#%
- set muli=%muli:10=t%
- set muli=%muli: 、=%
- set /a t=10
- set yushu=0123456789t
- set code=10X98765432
- for /l %%i in (0 1 10) do call set ".%%code:~%%i,1%%=%%yushu:~%%i,1%%"
- for %%a in (%idbox%) do (
- set id=%%a
- set/p=!id:#=?!<nul
- for /l %%b in (0 1 15) do (
- call set /a "sum+=%%id:~%%b,1%%*%%muli:~%%b,1%%"
- )
- for %%c in (0 1 2 3 4 5 6 7 8 9) do (
- if not defined yes (
- set /a t_sum=sum+%%c*2
- set /a t_mod=t_sum%%11
- set t_mod=!t_mod:10=t!
- for /f "delims==" %%d in ('set .^|findstr /e !t_mod!') do (
- if "%%d"==".!id:~-1!" (
- echo; 应该是:!id:#=%%c!
- set yes=1
- )
- set "t_sum=" & set "t_mod="
- )
- )
- )
- set "sum="
- set "yes="
- )
- echo;over&pause>nul&exit /b
复制代码
|