Codemania --> Celestial Voyage

Hello friends can someone help with the math behind this problem ??
@vijju123 @kaushal101 @mohit_negi @taran_1407 @vivek_1998299

Thanks in advance :slight_smile: