Mcan someone tell me what are the limits for T cause i really doubt that this is solvable in pascal...for huge t u cannot even read in time...0.1 sec the last test case wont pass no matter what i do.
what is the guess for the number we should write
imo its sqrt(2*n)
Mhow did u do it my gues is sqrt(2*n) but still TLE on last...
AMy solution :
Create array 1 3 6 10 15 21 . . .
Than binary search for number .
Mhmmm well when u do sqrt(2*n) then it is either that or that minus 1 or 2 so only 2-3 checks for every n and that binary search would take longer but idk maybe sqrt takes too long?or perhaps cant solve it cause of pascal?
AY Pascal's Sqrt is slow IMHO .
M:((((
MAKES ME WANNA LEARN C++:D
ALEARN IT, JOIN THE DARK SIDE YOUNG SKYWALKER . xDDDD
DThe answer isn't always very near sqrt(2N)...
Mwell the thing is the sqrt operation isnt even done in time...