Get best answers to any doubt/query/question related to programming , jobs, gate, internships and tech-companies. Feel free to ask a question and you will receive the best advice/suggestion related to anything you ask about software-engineering , development and programming problems .

0 like 0 dislike
1,100 views
in Online Assessments by Expert (144,420 points)

1 Answer

0 like 0 dislike

I'm not able to comeup with solution in given constraints.
image
image

 

More formally:
You are given l and r where r can be upto 10^12 . you need to return the count of no of pairs such that sqrt(a^2-b) is integral where b lies between l and r (both l and r are inclusive).

by Expert (144,420 points)
...