好吧……我不会欧拉筛也就罢了…… 傻逼筛法竟然这么长时间以来 一直RE ……源头竟然是 int 爆了. #include<cstdio> #include<algorithm> using namespace std; ]; int a,b; long long ans; void Shai() { vis[]=true; ;i<=;i++) ;j+=i) vis[j]=true; } int main() { scanf("%d%d",&a,&a…
Carmichael Numbers An important topic nowadays in computer science is cryptography. Some people even think that cryptography is the only important field in computer science, and that life would not matter at all without cryptography. Alvaro is one…
输出:一个集合S,表示1~n以内所有的素数 import java.util.Scanner; public class 筛法求素数 { public static void main(String[] args) { int n; Scanner sc = new Scanner(System.in); n = sc.nextInt(); int[] arr = new int[n]; for (int i = 2; i < n; i++) { arr[i] = i; } for (int i…