摘要: #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; ... 阅读全文
posted @ 2018-06-05 23:46 Cirno-9 阅读(181) 评论(0) 推荐(0) 编辑
摘要: For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, product and quotient. Input Sp 阅读全文
posted @ 2018-06-05 22:55 Cirno-9 阅读(127) 评论(0) 推荐(0) 编辑