摘要: 数学知识 数论 质数 试除法判定质数 \(O(\sqrt n)\) bool is_prime(int x) { if (x < 2) return false; for (int i = 2; i <= x / i; i ++ )//sqrt(x)较慢,i*i存在溢出风险 if (x % i == 阅读全文
posted @ 2025-04-01 19:02 YamadaRyou 阅读(83) 评论(0) 推荐(0)