UVA12678 Mixing Colours

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=602&page=show_problem&problem=4416 [PDF](https://uva.onlinejudge.org/external/126/p12678.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12678/9db279a3bb298a51914c29abbd519a0d58282004.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12678/a90929540e62fe360163e5bb809cefaa657d589e.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12678/431e9880bca6db6fe193e090295e61d40dc65fea.png)