The only thing that matters is the functionality. It might not be optimized but it just needs to work.
Nope, you will be shocked how simple the solution is!
The only thing that matters is the functionality. It might not be optimized but it just needs to work.
Nope, you will be shocked how simple the solution is!
I am sooooo struggling! I think I need a right idea, because I am thinking in the wrong way. I believe that there is a too simplie soultion for this but I can’t get it!
Mine has 39 blocks too! OMG I’m so happy that I found a way that you probably found too!
Mine has 34 now but maybe there is a better solution
If your solution works you can post it here under two tags: details & spoiler
Yeah it can be that I used global variable but not local or idk what.
Ok. my solution is here: tell me if something is wrong, because I have no emulator, and my companion is not useable now. So I couldn’t check the solution.
Tested on 30 different examples.
[n,m] = map(int, input().split())
if (n+m)%3==1:print(1)
else:print(0)
I knew ther was a muuuuch easier solution. But I never was interested in maths so I even didn’t knew what modulo was. now I know it. Thx @Mateja!
What’s with my “solution”? Is it really one or just something working on several numbers but not all?
nope.
It works. The question is…which answer should I mark as the solution?
I don’t mind about solution. Mark yours, it uses less blocks.
i was too on the same path bur really was not able to figure out the way before you guys, i was also approaching it from matrices and was generalizing the formula for the same
anyways , a nice challenge. Looking forward for more such in future
I checked it and I know why it’s not working. 1 - 5 is a neg number, and these I haven’t implemented in my code. So that’s my solution, and I hope it works now:
Also, I have 60 blocks, so that’s not a good solution.
X=7 Y=8 must be 0. 7-8=-1. So still not working
Yeah, this is not a solution.
I just hoped this works but it’s no mathematical and just too long (blocks), so this is just nothin. In future, I will also learn math blocks (from today on).
Thx, @Mateja !
Great challenge that has infected me with curiosity!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.