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.
This may work only in problems of level < 1000... Both examples you provided were Codeforces Div2 A problems. Harder problems require more observations and thinking.
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.
helped me in recent edu B problem 😁😁
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.
I also solved both this questions seeing the test cases, without proving 😅
0:58 is literally me with every question
Great video, just started my CF journey and currently newbie. Whats your CF rating if you dont mind me asking
awesome video, thanks
This may work only in problems of level < 1000... Both examples you provided were Codeforces Div2 A problems.
Harder problems require more observations and thinking.
Hi - yeah I realize this, I was trying to give tips for people struggling in the easier questions so that they can solve them easier. Thanks though!
@@beaconcodes yes but try to tell that this trick work for A level ques or B level .
BTW thanks for the video
pretty good tip for fast-solve, that provides you the opportunity to take a higher place in standings
Typedb round, problem E is a 2100 rated problem that can be guessed from samples
@@KelinZhu 😦 I didn't participate in it, but this is weird that problem C was dp and hard for many intelligent people and E is that easy.
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..
really found this helpful
nice work man keep on going
never comeback
You gave me the easiest ways to hack those who solved such problems.
brilliant!
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 :]