UVA11360 Have Fun with Matrices

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=25&page=show_problem&problem=2345 [PDF](https://uva.onlinejudge.org/external/113/p11360.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11360/667c34cf4e45f7ffd80ad6e9bb51660a58b87a0f.png)

Input Format

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

Output Format

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