Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
|
|
@ -0,0 +1,18 @@
|
|||
@echo off
|
||||
setlocal enableextensions enabledelayedexpansion
|
||||
set /p a=
|
||||
set /p b=
|
||||
call :pow %a% %b%
|
||||
echo %_a%
|
||||
goto :eof
|
||||
:pow Integer Integer
|
||||
:: Right-to-left binary exponentiation
|
||||
set /a "_a=1, s=%1, e=%2"
|
||||
:looppow
|
||||
if %e% neq 0 (
|
||||
set /a "t=e&1"
|
||||
if !t! equ 1 (set /a "_a*=s")
|
||||
set /a "s*=s, e>>=1"
|
||||
goto looppow
|
||||
)
|
||||
goto :eof
|
||||
Loading…
Add table
Add a link
Reference in a new issue