Here , u just have to a = c^d , if then check if it do satisy the condition or not , if it doesn't then cout -1 , else a. I would appreciate if you can add proof for same.
1 line soln for Today Div 2 C
Here , u just have to a = c^d , if then check if it do satisy the condition or not , if it doesn't then cout -1 , else a. I would appreciate if you can add proof for same.