Shout out to the problem setter, to please go through submission id : 22669739 . I know the logic of converting the seed by swapping the first 3 digits with last and subtracting the magic number ( 8_xx) where xx is a perfect square.
I have implemented it perfectly fine. Can you please take a look and point me in the right direction?