Help regarding RECIPE ( code name )

Hey can anybody please help me finding what’s wrong in this code, I can’t find why it is giving wrong answer …

Question link :- https://www.codechef.com/problems/RECIPE
My solution :- https://www.codechef.com/viewsolution/25512665

Thank You !

Your code doesn’t work for input:
1
2 6 9
Ans is : 2 3
You have to find the reduced version of ingredients, maintaining the same ratio.

Yes got it, Thank you Abhishek @abhishek_987 .

1 Like