i was thinking of odd even property, gone in a very different track.. thanks also the problem statement was not very clear
@swayamsidhant23183 жыл бұрын
Yeah got 7-8 WA and ended up getting just 150 points in this question😂😂
@codeExplainer3 жыл бұрын
hahahah , true
@nayanmathur60643 жыл бұрын
The problem statement is absolutely correct. If it is written, the number is divisible by A then its your mistake to deduce that it is only divisible by A not B. Also, I watch streaming of LGM's on youtube, so I have a doubt why do you explain only A and B problems? Please also try to explain all the problems from a normal Div2 and Div3 rounds so that it could make sense from next time.
@praveshvajpayee31333 жыл бұрын
I agree he should first solve and then explain D AND E
@my_religion3 жыл бұрын
Thanks alot!
@codeExplainer3 жыл бұрын
You're welcome!
@atharvakulkarni20243 жыл бұрын
very true problem statement was wrong thats y i couldnt solve..Thanks for the video..:)
@sanskarkumar79843 жыл бұрын
No bro it wasn't.
@codeExplainer3 жыл бұрын
Glad it helped
@manimanidev7383 жыл бұрын
If nearly good number divisible by both a&b then it is also divisible by a*b that is good.
@codeExplainer3 жыл бұрын
no , if u read the problem statement , let a = 4 and b=6 , so 24 is good because it is multiple of a*b, but 12 is nearly good as it is divisible by a , and also b, but it is not divisible by a*b.
@sanskarkumar79843 жыл бұрын
I got an AC before the problem statement was changed. Idk it was a fluke or my skills. 😅😅😅
@codeExplainer3 жыл бұрын
ohhh nice ..
@questionpaper42723 жыл бұрын
Bro, what do the column hack means with respect to this contest!?
@codenchill7323 жыл бұрын
how we can put x=1 , y=1 why?
@questionpaper42723 жыл бұрын
Bro, we are not putting, like for example if x and y takes any other value, the number is surely going to be different and it can't take zero as the whole thing becomes zero. So, we take a special case of equal number to check the condition and choosing 1 makes calculation more easier!!?? Hope I have answered your question! If anything wrong do let me know
@pawanagrawal76533 жыл бұрын
Their are no test cases on which the ans is no..??
@shitalkallole30563 жыл бұрын
A=any number, B=1 -> answer will always be "NO" because each number is divisible by (a*b) so each number is good .
@pawanagrawal76533 жыл бұрын
@@shitalkallole3056 yhh..😀
@ImamulHasan7173 жыл бұрын
why you use the extra function in the beginning of the code?
@codeExplainer3 жыл бұрын
the extra function , are there for some modular arithmetic problems , they are of no use , just part of my template.
@rishabh20553 жыл бұрын
What should be the answer for A = 4, B = 2?
@Newbie03413 жыл бұрын
4 8 12
@rishabhmehrotra38873 жыл бұрын
12 is not divisible by 8 (4*2), I guess this will not work
@sahilkommu16193 жыл бұрын
@@rishabhmehrotra3887 it will work becaus we only need one good number which is 8 and 4,12 are nearly good.
@ayushkishoremishra81413 жыл бұрын
what should be the ans of A=95 and B=1 why it cant be 95 190 285
@vivekgoswami42622 жыл бұрын
Same doubt if you understood please explain me too
@ganeshchowdhary30242 жыл бұрын
It is because the problem statement says that "exactly one is good and other two are nearly good". So here 190, 95 and 285 are good which is a contradiction to the problem statement. Read the problem statement carefully to find the edge cases to be handled.
@anonymoussheriff11572 жыл бұрын
Got struck in the same test case lmao!
@owaiskorejo Жыл бұрын
@@ganeshchowdhary3024 thanks man
@aadhikeaswar69743 жыл бұрын
if a%b==0 then we can not get nearly good numbers at all how does this solution work then?
@codeExplainer3 жыл бұрын
i was also thinking that during the contest , but see the example , we can get nearly good number also , if a=4 and b=2 , then 8 is a nearly good number , as it is divisible by a , and that is the only condition.
@aadhikeaswar69743 жыл бұрын
@@codeExplainer thanks great video I found it very helpful!