How to find whole-number ratios from percentages? Let's say I have a results of a small vote - but only in percentage form and want actual vote counts (as well as total vote).
For example:


*

*$A: 47.4$%

*$B: 26.3$%

*$C: 26.3$%


In this case, I constructed a spreadsheet of votes vs total votes, and looked down until all the numbers were close to whole numbers (which occurs at total votes $= 19$, with $9$, $5$, $5$ respectively).


*

*Is there a mathematical way I can take these numbers and estimate the vote quantities - assuming those percentages are rounded? 


I am willing to make the assumption it is the lowest time where values are close to whole numbers (ie at $19$ and not $38$, etc) as well as consider all numbers within $0.05$ of a whole number to be considered valid.

The context is an online game, where different groups often post election results in percentage form. Sometimes it can be strategically advantageous to approximate what percentage of their group voted from these results.
 A: The continued fraction for $0.474$ is $(0,2,9,8,1,2)$. The approximants for the partial continued fractions are
$$
\begin{array}{}
&&0&2&9&8&1&2\\
\hline\\
0&1&0&1&\color{#C00000}{9}&73&82&237\\
1&0&1&2&\color{#C00000}{19}&154&173&500
\end{array}
$$
The approximant $\frac{9}{19}=0.473684210526316$ is close enough to be rounded to $0.474$.
The continued fraction for $0.263$ is $(0,3,1,4,17,3)$. The approximants for the partial continued fractions are
$$
\begin{array}{}
&&0&3&1&4&17&3\\
\hline\\
0&1&0&1&1&\color{#C00000}{5}&86&263\\
1&0&1&3&4&\color{#C00000}{19}&327&1000
\end{array}
$$
The approximant $\frac{5}{19}=0.263157894736842$ is close enough to be rounded to $0.263$.
Thus, the smallest number of total votes that gives the correct rounded results is $19$, with the votes being $9$, $5$, and $5$.
A: First, let me state that if the number of votes are high enough, then you most likely can't get it anyway. For example, if you have three decimal places as above but the total vote counts are more than about 20 or 30, it might be impossible as some fractions will actually have the same decimal representation.
However, in this case, what you can do is try to find continued fraction approximations of each number, and pick a denominator that 1) is common to all the percentages, and 2) actually gives the correct rounded result.
