# Daily Challenge #62

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!

1 Like

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!

1 Like

Mine has 39 blocks too! OMG I’m so happy that I found a way that you probably found too!

2 Likes

Mine has 34 now but maybe there is a better solution

2 Likes

If your solution works you can post it here under two tags: details & spoiler

1 Like

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.

Solution (maybe)

1 Like
My solution

Tested on 30 different examples.

Kodular

Python
``````[n,m] = map(int, input().split())
if (n+m)%3==1:print(1)
else:print(0)
``````
3 Likes

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!

1 Like

I also used modulo but i didn’t think it that way. That’s why i have so many blocks

My Solution
1 Like

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.

1 Like

I would love to see what @Deepanshu_Arya was up to!

1 Like

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

1 Like

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:

Solution (maybe)

Also, I have 60 blocks, so that’s not a good solution.

1 Like

X=7 Y=8 must be 0. 7-8=-1. So still not working

2 Likes

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!

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.