UVA12065 Permutation Primes

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=242&page=show_problem&problem=3217 [PDF](https://uva.onlinejudge.org/external/120/p12065.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12065/943a12672c9597fa574a273c024daa7fead052b9.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12065/441b37c319b2455924a76343ce9491153b7edc42.png)