摘要:
题意:给出N个数和M,求1到M的数中与给出的N个数有大于1的公共因子的数的个数。思路:算是第一道容斥原理的题吧,1Y、^_^,神搜求最小公倍数奇数个相加、偶数个相减。题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2836View Code 1 #include <cstdio> 2 #include <cmath> 3 #include <cstdlib> 4 #include <cstring> 5 #include <string> 6 #inc 阅读全文