Here you can solve interesting problems using whatever programming language you like. Also you will earn [SBI](https://steemit.com/@steembasicincome) and sometimes [STEM](https://stemgeeks.net) by doing so. Also you might learn new things by doing so. The tasks will be rather hard to solve without a programmable computer and some programming skills, but if you want to add a few million numbers by hand or similar, I would still give you the reward. *↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓* # Rules #### No upvote, No resteem, No follow required! #### I will give the prize randomly to those who solved the problem. #### If two pieces of code are to closely related I might consider the later of them as copied which results in no prize for that person. #### You have 4 days to solve it. #### Even though this is about computation I will also accept algebraic solutions if you find one. #### In order to get accepted you need to somehow attach your code. *↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓* # Problem Today I want to give you a problem you can't just solve with brute force. You need to simplify the problem first: Find the smallest integer number x that satisfies the following equations: ``` x mod 9 = 4 x mod 10 = 5 x mod 11 = 6 x mod 12 = 7 x mod 13 = 8 : : : x mod 125 = 120 x mod 126 = 121 x mod 127 = 122 x mod 128 = 123 ``` Tip: The number is **big**! Normal integers might overflow! *↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓* To everyone who already participated in a past contest, come back today and try a new problem(tell me if you don't want to be tagged): @crokkon @kaeserotor @tonimontana @ninahaskin In case no one gets a result(which I doubt), I will give away the prize to the person who makes the most constructive description why the problem is too hard in your opinion. *↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓* @contrabourdon sponsors my contests with 2 STEEM weekly. You can support him by [using a witness vote on untersatz](https://v2.steemconnect.com/sign/account-witness-vote?witness=untersatz&approve=1), so he can further support this and other contests.
author | quantumdeveloper |
---|---|
permlink | computation-contest-6-2-sbi |
category | programming |
json_metadata | {"tags":["programming","puzzle","contest","stem","steembasicincome","sbi","math","steemstem","steemiteducation","palnet"],"users":["crokkon","kaeserotor","tonimontana","ninahaskin","contrabourdon"],"links":["https://steemit.com/@steembasicincome","https://stemgeeks.net","https://v2.steemconnect.com/sign/account-witness-vote?witness=untersatz&approve=1"],"app":"palnet/0.1","format":"markdown","canonical_url":"undefined/@quantumdeveloper/computation-contest-6-2-sbi"} |
created | 2019-11-24 21:32:03 |
last_update | 2019-11-24 21:39:00 |
depth | 0 |
children | 7 |
last_payout | 2019-12-01 21:32:03 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.045 HBD |
curator_payout_value | 0.040 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 2,139 |
author_reputation | 4,456,611,502,865 |
root_title | "Computation Contest #6 [2 SBI]" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 92,801,155 |
net_rshares | 529,743,268,008 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
doitvoluntarily | 0 | 11,652,688,041 | 100% | ||
zorg67 | 0 | 1,355,931,682 | 100% | ||
steemitboard | 0 | 27,253,985,623 | 2% | ||
edkarnie | 0 | 77,947,640,558 | 20% | ||
crokkon | 0 | 73,347,100,184 | 100% | ||
mytechtrail | 0 | 43,049,697,275 | 25% | ||
stmdev | 0 | 144,048,853 | 1% | ||
tonimontana | 0 | 3,241,208,588 | 100% | ||
nin4i | 0 | 178,247,416 | 100% | ||
remlaps-lite | 0 | 11,510,836,957 | 100% | ||
laissez-faire | 0 | 67,077,207 | 100% | ||
chappertron | 0 | 20,774,217,444 | 100% | ||
darklands | 0 | 103,657,315,829 | 58% | ||
driveforkids | 0 | 43,227,128,377 | 40% | ||
limka | 0 | 0 | 1% | ||
onespringday | 0 | 1,164,271,774 | 10% | ||
babytarazkp | 0 | 7,205,752,149 | 100% | ||
mapxv | 0 | 41,302,565,166 | 4.59% | ||
abh12345.stem | 0 | 433,176,022 | 50% | ||
giphy | 0 | 6,868,262,989 | 10% | ||
brustem | 0 | 348,757,953 | 100% | ||
curation.stem | 0 | 96,946,656 | 75% | ||
untersatz | 0 | 51,514,413,017 | 10% | ||
stem.alfa | 0 | 434,462,000 | 100% | ||
vxc.stem | 0 | 40,943,141 | 100% | ||
stemd | 0 | 328,425,959 | 100% | ||
thebilpcointrain | 0 | 65,834,328 | 1% | ||
bilpcoin.pay | 0 | 202,245,287 | 1% | ||
yggdrasil.laguna | 0 | 342,826,660 | 70% | ||
miti.stem | 0 | 345,073,474 | 100% | ||
qitrulle | 0 | -6,019,836 | -10% | ||
likredu | 0 | -3,895,117 | -10% | ||
stemisaria | 0 | 1,652,102,352 | 100% |
author | crokkon |
---|---|
permlink | q1l2qb |
category | programming |
json_metadata | "{"app": ""}" |
created | 2019-11-26 15:51:39 |
last_update | 2022-09-17 20:22:54 |
depth | 1 |
children | 2 |
last_payout | 2019-12-03 15:51:39 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 1 |
author_reputation | 81,214,366,861,104 |
root_title | "Computation Contest #6 [2 SBI]" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 92,852,464 |
net_rshares | 10,132,220,766 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
ismailkah | 0 | 5,441,558,358 | 25% | ||
quantumdeveloper | 0 | 4,690,662,408 | 100% |
\*Calculating in fractions of a second\* 😂
author | portalmine |
---|---|
permlink | re-crokkon-q1lggj |
category | programming |
json_metadata | {"tags":["programming"],"app":"steempeak/2.1.1"} |
created | 2019-11-26 20:48:21 |
last_update | 2019-11-26 20:49:27 |
depth | 2 |
children | 0 |
last_payout | 2019-12-03 20:48:21 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 43 |
author_reputation | 940,579,902,362 |
root_title | "Computation Contest #6 [2 SBI]" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 92,859,609 |
net_rshares | 0 |
You should try to make more optimizations like the one you did for 128. By the way: A good solution won't run more than a few minutes.
author | quantumdeveloper |
---|---|
permlink | q1lckh |
category | programming |
json_metadata | {"app":"steemit/0.1"} |
created | 2019-11-26 19:24:18 |
last_update | 2019-11-26 19:24:18 |
depth | 2 |
children | 0 |
last_payout | 2019-12-03 19:24:18 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.011 HBD |
curator_payout_value | 0.011 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 135 |
author_reputation | 4,456,611,502,865 |
root_title | "Computation Contest #6 [2 SBI]" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 92,858,017 |
net_rshares | 146,468,844,212 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
dustsweeper | 0 | 46,839,225,823 | 8.36% | ||
darklands | 0 | 99,629,618,389 | 57% |
So if I'm right, one solution for all equations is ```x = !128/!8-5``` as the right side is always 5 smaller then the divider on the right side and the equations cold be rewritten as ```x+5 mod d = 0``` so 9 to 128 have to divide x+5. When multiplying all the dividers together, the result can be divided by all of them and is exactly 5 bigger than x. But this obviously is not the smallest number, because many numbers from 9 to 128 are multiples (e.g. 9 and 18) so we only need to multiply with the biggest multiple below 129. My program simply tests if x is a multiple of the divider. If it's not, it multiplies x to the divider making it a divider. This procedure is repeated with dividers from 128 to 9 downwards. ``` x = 1 while True: for i in range(128, 8, -1): if x % i == 0: pass else: x *= i break else: x -= 5 break ``` So ```x = 3692046484038964353473548580043636599281147520791807426559995``` If I win, please send the rewards to @portalvotes
author | portalmine |
---|---|
permlink | re-quantumdeveloper-q1lgb1 |
category | programming |
json_metadata | {"tags":["programming"],"app":"steempeak/2.1.1"} |
created | 2019-11-26 20:45:03 |
last_update | 2019-11-26 20:51:24 |
depth | 1 |
children | 1 |
last_payout | 2019-12-03 20:45:03 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 1,033 |
author_reputation | 940,579,902,362 |
root_title | "Computation Contest #6 [2 SBI]" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 92,859,552 |
net_rshares | 4,808,121,721 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
quantumdeveloper | 0 | 4,808,121,721 | 100% |
Your solution is good, but it isn't the smallest. There one which is 5 orders of magnitude smaller.
author | quantumdeveloper |
---|---|
permlink | q1mwda |
category | programming |
json_metadata | {"app":"steemit/0.1"} |
created | 2019-11-27 15:29:36 |
last_update | 2019-11-27 15:29:36 |
depth | 2 |
children | 0 |
last_payout | 2019-12-04 15:29:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.011 HBD |
curator_payout_value | 0.011 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 99 |
author_reputation | 4,456,611,502,865 |
root_title | "Computation Contest #6 [2 SBI]" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 92,880,754 |
net_rshares | 143,920,274,917 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
dustsweeper | 0 | 43,142,064,532 | 7.37% | ||
darklands | 0 | 100,778,210,385 | 57% |
Congratulations @quantumdeveloper! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) : <table><tr><td><img src="https://steemitimages.com/60x70/http://steemitboard.com/@quantumdeveloper/votes.png?201911251632"></td><td>You distributed more than 1500 upvotes. Your next target is to reach 1750 upvotes.</td></tr> </table> <sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@quantumdeveloper) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=quantumdeveloper)_</sub> <sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub> To support your work, I also upvoted your post! > You can upvote this notification to help all Steem users. Learn how [here](https://steemit.com/steemitboard/@steemitboard/http-i-cubeupload-com-7ciqeo-png)!
author | steemitboard |
---|---|
permlink | steemitboard-notify-quantumdeveloper-20191125t164644000z |
category | programming |
json_metadata | {"image":["https://steemitboard.com/img/notify.png"]} |
created | 2019-11-25 16:46:42 |
last_update | 2019-11-25 16:46:42 |
depth | 1 |
children | 0 |
last_payout | 2019-12-02 16:46:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 912 |
author_reputation | 38,975,615,169,260 |
root_title | "Computation Contest #6 [2 SBI]" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 92,824,237 |
net_rshares | 0 |
I am a bit late but here is my solution. The equations can written like x mod 9=-5, x mod 10=-5, x mod 11=-5... So we just need to look for the least common multiple of 9 10 ... 128 and subtract 5. That can be done for example by iteratively computing the lcm of 2 numbers I think . My answer is 13353756090997411579403749204440236542538872688049071995 The python code is below ```python def gcd(x, y): while(y): x, y = y, x % y return x a = [] for x in range(9,129): a.append(x) lcm=1 for x in a: lcm=int(abs(lcm*x))//int(gcd(lcm,x)) print(lcm%x,lcm) for x in range(9,129): if((lcm-5)%x==x-5): pass else: print("Nope") print(lcm-5)
author | tonimontana |
---|---|
permlink | re-quantumdeveloper-q1p5z3 |
category | programming |
json_metadata | {"tags":["programming"],"app":"steempeak/2.2.3"} |
created | 2019-11-28 20:52:15 |
last_update | 2019-11-29 18:19:18 |
depth | 1 |
children | 0 |
last_payout | 2019-12-05 20:52:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 694 |
author_reputation | 4,423,485,388,975 |
root_title | "Computation Contest #6 [2 SBI]" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 92,917,509 |
net_rshares | 8,980,847,896 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
portalmine | 0 | 4,320,810,956 | 100% | ||
quantumdeveloper | 0 | 4,660,036,940 | 100% |