You are viewing a single comment's thread from:

RE: Computation Contest #9 [2 SBI]

in #programming2 years ago (edited)

https://github.com/billyb2/quantum-developer-contests/blob/master/comp-contest-%239.html
Saves as much computation power as possible by limiting the amount of operations.

Also works for negative multiplication.

Unfortuantely, it's slows down for much larger numbers, and is in general slower since it runs in the browser. It tries to improve efficiency as well as possible, however, by having adding the larger number to itself instead of just picking the first number.

Sort:  

What you did is just implementing "the intuitive algorithm of simple repeated addition" which I mentioned in the problem which is as you correctly discovered very slow because you need number2 additions.
You need to find something better.

By the way I ignore the speed differences of individual languages in these contests, because the algorithm would still be slow in any other language.

Thanks for the information, I'll work on redoing my answer now!

Coin Marketplace

STEEM 0.27
TRX 0.07
JST 0.042
BTC 30078.86
ETH 2040.08
USDT 1.00
SBD 2.65