UVA457 Linear Cellular Automata

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=6&page=show_problem&problem=398 [PDF](https://uva.onlinejudge.org/external/4/p457.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA457/374c8cc6dace9215b9ff180b7f29f4236c5e2fef.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA457/55af955e3bb3b8b907ea488d758a3afa81029895.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA457/5e3f4f280bc2fd2fc2ef8fee2e4aeab93d226a85.png)