2 3 5 7的倍数(容斥定理)
题目:http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1284
容斥定理裸题
定理:
#include<iostream> using namespace std; int main() { __int64 int x; cin>>x; cout<<x-(x/2+x/3+x/5+x/7-x/2/3-x/2/5-x/2/7-x/3/5-x/3/7-x/5/7 +x/2/3/5+x/2/3/7+x/2/5/7+x/3/5/7-x/2/3/5/7); }