Birthday paradox TLE problem

my code gives TLE for testcase #6
i’ve checked it with prateek bhaiya’s code, it’s the same but still it gives TLE
link to my code :- https://ide.codingblocks.com/s/172643