Here is the video solution : PPDIV
I know you will think that I am mad if I say that this problem was easy. You heard it right! This problem is easy even though it have low number of submissions. This problem only required some basic observations and good knowledge of your programming language.
I am 100 percent sure that those of you who used sqrt instead of sqrtl would have got wrong answer for last subtask.