题目
代码
#include<bits/stdc++.h>
#define int long long
using namespace std;
int a[100];
signed main(){
int n;
a[1]=2;
a[2]=5;
a[3]=11;
a[4]=13;
while(cin>>n){
int ans=n;
for(int i=1;i<(1<<4);i++){
int cnt=0,temp=1;
for(int j=0;j<4;j++){
if((1<<j)&i){
cnt++;
temp*=a[j+1];
}
}
// cout<<cnt<<" "<<temp<<endl;
if(cnt&1) ans-=n/temp;
else ans+=n/temp;
}
cout<<ans<<endl;
}
}