摘要: 素数的判定 试除法 (1)普通 复杂度:$O(n)$ bool prime(int x){//判断x是不是质数,是返回true,不是返回false if(x <= 1) return false; for(int i = 2; i < x; i ++){ if(x % i == 0) return 阅读全文
posted @ 2019-10-15 21:14 czc1999 阅读(340) 评论(0) 推荐(0) 编辑