UVA810 筛子难题 A Dicey Problem

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=10&page=show_problem&problem=751 [PDF](https://uva.onlinejudge.org/external/8/p810.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA810/cd4bd1c7f4d7f59f72038bc5eafa13bdc05eb024.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA810/7530076a3ca72f45d78c06d24b0a7f21bcb573f9.png)