+ 1

Hello, I need help. I don't know how to shrink code. It is ok for integers but not for 12-digits number. It becomes dumped.

https://code.sololearn.com/cc793GAMFgxP/?ref=app Dumped because of all these declarations. Anybody help?

27th Sep 2021, 7:27 PM
TeaserCode
3 ответов
+ 2
What I can see for the example with n=3 is: 1 | 6 - > sum 7 3 | 4 - > sum 7 5 | 2 - > sum 7 So I did it this way: /*23633656673 310027696726), Equals(596421736780));*/ val n = 310027696726 val address = 23633656673 val nx2plus1 = (n * 2) + 1 var opposide = nx2plus1 - address print(opposide) // => 596421736780 Maybe you can translate it to C++ and write it a little bit shorter.
27th Sep 2021, 9:24 PM
Coding Cat
Coding Cat - avatar