Pro.ID10187 TitleThe Primes Title链接http://10.20.2.8/oj/exercise/problem?problem_id=10187 AC3 Submit14 Ratio21.43% 时间&空间限制描述In the square below, each row, each column and the two diagonals can be read as a five digit prime number. The rows are read from left to right. The columns are read from top to bottom. Both diagonals are read from left to right. +---+---+---+---+---+
输入A single line with two space-separated integers: the sum of the digits and the digit in the upper left hand corner of the square. 输出Description In the square below, each row, each column and the two diagonals can be read as a five digit prime number. The rows are read from left to right. The columns are read from top to bottom. Both diagonals are read from left to right. +---+---+---+---+---+
Input A single line with two space-separated integers: the sum of the digits and the digit in the upper left hand corner of the square. Output Five lines of five characters each for each solution found, where each line in turn consists of a five digit prime number. Print a blank line between solutions. If there are no prime squares for the input data, output a single line containing "NONE". Sample Input 11 1 Sample Output The above example has 3 solutions. 11351 Source 样例输入11 1 样例输出The above example has 3 solutions. 11351 作者 |