Getting TLE in 2nd Test Case in Birthday Paradox Problem

https://online.codingblocks.com/player/3028/content/323?s=26

Getting TLE in 2nd test case in Birthday Paradox Problem.

post your code here then mistake can be finded out