create account

RE: Computation Contest #9 [2 SBI] by bootlegbilly

View this thread on: hive.blogpeakd.comecency.com

Viewing a response to: @quantumdeveloper/computation-contest-9-2-sbi

· @bootlegbilly · (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.
👍  ,
properties (23)
authorbootlegbilly
permlinkre-quantumdeveloper-202012t1547792z
categoryprogramming
json_metadata{"app":"steemit/0.1","format":"markdown+html","community":"esteem.app","links":["https://github.com/billyb2/quantum-developer-contests/blob/master/comp-contest-%239.html"]}
created2020-01-02 20:04:09
last_update2020-01-03 17:17:06
depth1
children2
last_payout2020-01-09 20:04:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length471
author_reputation1,522,279,533,235
root_title"Computation Contest #9 [2 SBI]"
beneficiaries
0.
accountesteemapp
weight300
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id93,962,401
net_rshares5,378,564,158
author_curate_reward""
vote details (2)
@quantumdeveloper ·
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.
👍  
properties (23)
authorquantumdeveloper
permlinkq3oq0m
categoryprogramming
json_metadata{"app":"steemit/0.1"}
created2020-01-06 12:14:48
last_update2020-01-06 12:14:48
depth2
children1
last_payout2020-01-13 12:14:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length391
author_reputation4,456,611,502,865
root_title"Computation Contest #9 [2 SBI]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id94,093,184
net_rshares2,071,072,017
author_curate_reward""
vote details (1)
@bootlegbilly ·
Thanks for the information, I'll work on redoing my answer now!
properties (22)
authorbootlegbilly
permlinkre-quantumdeveloper-202016t13131158z
categoryprogramming
json_metadata{"tags":["esteem"],"app":"esteem/2.2.2-mobile","format":"markdown+html","community":"esteem.app"}
created2020-01-06 18:13:00
last_update2020-01-06 18:13:00
depth3
children0
last_payout2020-01-13 18:13:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length63
author_reputation1,522,279,533,235
root_title"Computation Contest #9 [2 SBI]"
beneficiaries
0.
accountesteemapp
weight300
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id94,104,771
net_rshares0