Might work on A or B. But you shall really try to justify or prove your intuition. As on harder problems, things can get really complicated as numbers get large and just randomly guessing takes a lot of time. Building strong intuition also helps with problem solving. In contests I think it's perfectly fine to guess (though justify it at least). Though make sure to prove while practicing.
it works, consider k = 2 substitute x = k - 1 (i.e. x = 1) 1! + (1 - 1)! = 1! + 0! 1! = 1, 0! = 1 1 + 1 = 2 -> divisible by k. and for other values of k, which are odd, if it is a prime number, x is always -1.
i didn't see the sol let's see if it's correct or not: my idea is: if n is odd then there is no answer: and if n is even then always ans should be: like (1,n/2) by solving equations..
Whenever I use guess these 50% of it comes WA on test case 2
Relatable 😂🥲
And this is how I became Candidate Master
from Master
Lmao
🤣🤣
Nice video and amazing animation, keep up the work!
I use this "trick" myself quite often.
It's kinda funny that I remeber seeing and solving both problems during the actual competitions
Might work on A or B. But you shall really try to justify or prove your intuition. As on harder problems, things can get really complicated as numbers get large and just randomly guessing takes a lot of time. Building strong intuition also helps with problem solving.
In contests I think it's perfectly fine to guess (though justify it at least). Though make sure to prove while practicing.
This will get you to green at most
0:58 is literally me with every question
helped me in recent edu B problem 😁😁
I also solved both this questions seeing the test cases, without proving 😅
really found this helpful
nice work man keep on going
never comeback
In the second problem, if k is a prime number, then there is no solution. So, a one-liner doesn't always work.
I don't get it? Let's sub x = k -1. We get (k-1)! + (k-2)! which equals k*(k-2)!, i.e. it's a multiple of k.
it works, consider k = 2
substitute x = k - 1 (i.e. x = 1)
1! + (1 - 1)! = 1! + 0!
1! = 1, 0! = 1
1 + 1 = 2 -> divisible by k.
and for other values of k, which are odd, if it is a prime number, x is always -1.
awesome video, thanks
Great video, just started my CF journey and currently newbie. Whats your CF rating if you dont mind me asking
i didn't see the sol let's see if it's correct or not: my idea is: if n is odd then there is no answer: and if n is even then always ans should be: like (1,n/2) by solving equations..
brilliant!
You gave me the easiest ways to hack those who solved such problems.
I know It works but There's no way someone can reach > 1200 using these 'tricks' though.
Stop using thumbnail of this Rating Graph please. :(
beacon orz
south african?
WTH BRO :]