vijos时光的秘密模拟赛(t1)
来源:互联网 发布:甜椒刷机软件 编辑:程序博客网 时间:2024/06/06 05:52
/*该死的出题人,还莫比乌斯反演....*/
/*不过我的做法好像也对啊,不知为何错了*/
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<map>
using namespace std;
typedef long long ll;
ll k,cnt=0,prime[]={0,2,3,5,7,11,13,17,19,23,29},num[2010];
map<int,int> a;
void dfs(int x,ll now){
if(!a.count(now)){
num[++cnt]=now;
a[now]=1;
}
if(x>10) return;
dfs(x+1,now*prime[x]);
dfs(x+1,now);
}
int main(){
cin>>k;
dfs(1,1);
sort(num+1,num+1+cnt);
int cur=0,cur1;
for(int i=1;i<=cnt;i++){
if(num[i]<=k){
++cur;
}
else break;
}
ll now=0,now1=k;
while(true){
if(now==cur) break;
++now1;
if(!a.count(now1)){
++now;
//cout<<now1<<' ';
}
}
// cout<<endl;
cout<<now1<<endl;
return 0;
}
阅读全文
0 0
- vijos时光的秘密模拟赛(t1)
- 被时光掩埋的秘密
- 【faebdc的模拟赛】T1错位
- snacks的模拟赛(t1)
- vijos 夜夜的noip之旅 t1
- 20160823模拟赛T1
- loj模拟赛t1
- Vijos模拟赛
- 【20160904】NOIP模拟赛T1
- 2016.10.13模拟赛T1
- NOIP11.15模拟 T1 SJR的直线
- 2016.7.15_模拟赛t1 立方体
- Vijos P1130数的计数【模拟】
- Vijos 1316-明明的随机数【模拟】
- Vijos P1379 字符串的展开(模拟)
- JZOJsenior2433.2017.04.08【NOIP 普及组】模拟赛C组 T1最短路上的统计
- 2017.04.15【NOIP2017提高组】模拟赛B组 T1:偷懒的小X
- JS模拟T1
- Xcode entitlement 问题定位和解决指南
- linux ls -l参数
- Xcode开发包文件存放路径
- PAT1016 部分A+B
- 用.et文件恢复.XLSX表格
- vijos时光的秘密模拟赛(t1)
- linux的常见目录结构
- jsoncpp封装和解析字符串、数字、布尔值和数组
- log4j配置详解
- git常用命令
- yii composer安装 github授权问题
- 用js如何实现读取xml数据并且显示在html中
- python_strip()
- 动态添加和删除布局