摘要:
#include //素数的判断 bool isPrime(int n) { if (n <= 0) return false; //特判 int sqr = (int)sqrt(1.0 * n); for (int i = 2; i <= sqr; i++) { //遍历2-根号n if (n % i == 0) return Zfalse; ... 阅读全文
摘要:
For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, product and quotient. Input Sp 阅读全文