One test case missing

Last Test Case not accepted?

Please send your code link after saving on cb.lk/ide.

You are taking log(1/1-p), if p == 1, then your code will give any garbage value.