How to solve this problem (Related to Maths )

https://mycode.prepbytes.com/problems/maths/COVID