2019秋季PAT甲级_C++题解
2019 秋季 PAT (Advanced Level) C++题解 考试拿到了满分但受考场状态和知识水平所限可能方法不够简洁,此处保留记录,仍需多加学习。备考总结(笔记目录)在 这里 7-1 Forever (20 分) "Forever number" is a positive integer A with K digits, satisfying the following constrains: the sum of all the digits of A is m; the sum of all the digits of A+1 is n; and the greatest common divisor of m and n is a prime number which is greater than 2. Now you are supposed to find these forever numbers. Input Specification Each input file contains one test case. For each test case, the first line contains a positive integer $N (≤5)$. Then N lines follow, each gives a pair of $K (3