Link to the Question: 576A
Link to my code: Code
I was trying this question on Number theory and faced this error "Wrong Answer cannot distinguish 1 and 727". I couldn't detect the reason for the incorrect output. My code runs fine and gives correct result for the same input (test case 16) on other platform's IDEs. Please help!!