## equation

0

(click on this box to dismiss)

Preguntas y respuestas sobre el sitio para programadores y profesionales de la informática

``````DECLARE @troopstrength INT = 180000
DECLARE @troopbonushealth REAL = 240.5 + 25 + 4
DECLARE @troopbonusstrength REAL = 254.5
DECLARE @troopbonusstrength2 INT = 0
DECLARE @troopnumber INT = 6

/*
--level 17 inferno
DECLARE @enemy1strength INT = 4100
DECLARE @enemy1number INT   = 260
DECLARE @enemy2strength INT = 720
DECLARE @enemy2number INT   = 640
*/

/*

DECLARE @enemy1strength real = 1100
DECLARE @enemy1number INT   = 1100
DECLARE @enemy2strength real = 720 * 1.50 -- archers has bonus vs my troops
DECLARE @enemy2number INT   = 710
*/
--level 17 barb
DECLARE @enemy1strength real = 360*1.45
DECLARE @enemy1number INT   =  2700
DECLARE @enemy2strength real = 150 -- archers has bonus vs my troops
DECLARE @enemy2number INT   =  2700

SELECT
case when @enemy1strength * @enemy1number + @enemy2strength * @enemy2number < (@troopbonushealth + 100)/100*@troopstrength*3 then 'SAFE' ELSE 'KILL' END status,
case when @troopstrength * (@troopbonusstrength + @troopbonusstrength2 + 100)/100*@troopnumber <@enemy1strength * @enemy1number * 3 then 'not killing monster1' else 'ok' end,
case when @troopstrength * (@troopbonusstrength + 100)/100*@troopnumber < @enemy2strength * @enemy2number * 3 then 'not killing monster2' else 'ok' end,
mydamage1   = @troopstrength * (@troopbonusstrength + @troopbonusstrength2 + 100)/100*@troopnumber,
mydamage2   = @troopstrength * (@troopbonusstrength + 100)/100*@troopnumber,
monster1health = @enemy1strength * @enemy1number * 3 ,
monster2health = @enemy2strength * @enemy2number * 3 ,
monster1damage = @enemy1strength * @enemy1number,
monster2damage = @enemy2strength * @enemy2number,
totaldamage = @enemy1strength * @enemy1number + @enemy2strength * @enemy2number,
myhealth   = (@troopbonushealth + 100)/100*@troopstrength*3``````

### Enter Parameters

Options:
-
Switch to main site
Hold tight while we fetch your results
:records returned in :time ms:cached