sok - bradendubois/competitive-programming GitHub Wiki
Sok
ID: sok
Difficulty: 1.7
CPU Time: 1 second
Memory: 1024 MB
Solution
For this, take A/I, B/J, C/K, and sort these, taking the smallest of them. This is the most restrictive ratio on ingredients, so now output each A, B, C subtracting the previously-calculated ration, multipled by the respective I, J, K.