Editorial for JCC25 Contest 1 P3 - Percentage Composition


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

Author: what06

find the total mass then what percent is comprised by each element. keep it in a float and only cast at the end to prevent rounding error.


Comments

There are no comments at the moment.