UVA12670 Counting ones

Description

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

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12670/6a73bd1a12fd2a2e7c0b3c3fa83cea3647be1c04.png)

Output Format

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