c++: #include<iostream> #include<cmath> using namespace std; bool is_prime(int n){ //判断素数 if(n < 2){ return false; } for(int i = 2; i