Viewing a response to: @quantumdeveloper/computation-contest-6-2-sbi
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% |