Skip to content

Latest commit

 

History

History
24 lines (23 loc) · 2.3 KB

94-multiply-the-number.md

File metadata and controls

24 lines (23 loc) · 2.3 KB

Problem:

Jack really likes his number five: the trick here is that you have to multiply each number by 5 raised to the number of digits of each numbers, so, for example:

multiply(3)==15
multiply(10)==250
multiply(200)==25000
multiply(0)==0
multiply(-3)==-15
multiply(3)==15
multiply(10)==250
multiply(200)==25000
multiply(0)==0
multiply(-3)==-15
multiply(3)==15
multiply(10)==250
multiply(200)==25000
multiply(0)==0
multiply(-3)==-15
multiply   3  `shouldBe`    15
multiply  10  `shouldBe`   250
multiply 200  `shouldBe` 25000
multiply   0  `shouldBe`     0
multiply (-3) `shouldBe`  (-15)

Solution