UVALive 5987
求第n个数,该数满足至少由3个不同的素数的乘机组成
#include
#include
#include
#include
#include
using namespace std;
int prim[5000];
int ans[5000];
int cnt1,cnt2;
void getvis(){
     cnt1=-1;
    for(int i=2;i=3){
            ans[++cnt2]=i;
        }
    }
}
int main(){
   int t;
   scanf("%d",&t);
   getvis();
   getans();
   while(t--){
    int n;
    scanf("%d",&n);
    printf("%d\n",ans[n-1]);
   }
   return 0;
}
UVALive 5987的更多相关文章
- UVALIve 5987 素数
		题目链接:Distinct Primes 如果一个数.至少有三个因子是素数..那么这个数就是prime num.30和42是前两个prime num.问你第n个这种数是谁.(1<=n<=1 ... 
- UVALive - 4108 SKYLINE[线段树]
		UVALive - 4108 SKYLINE Time Limit: 3000MS 64bit IO Format: %lld & %llu Submit Status uDebug ... 
- UVALive - 3942 Remember the Word[树状数组]
		UVALive - 3942 Remember the Word A potentiometer, or potmeter for short, is an electronic device wit ... 
- UVALive - 3942 Remember the Word[Trie DP]
		UVALive - 3942 Remember the Word Neal is very curious about combinatorial problems, and now here com ... 
- 思维 UVALive 3708 Graveyard
		题目传送门 /* 题意:本来有n个雕塑,等间距的分布在圆周上,现在多了m个雕塑,问一共要移动多少距离: 思维题:认为一个雕塑不动,视为坐标0,其他点向最近的点移动,四舍五入判断,比例最后乘会10000 ... 
- UVALive 6145 Version Controlled IDE(可持久化treap、rope)
		题目链接:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_ ... 
- UVALive 6508  Permutation Graphs
		Permutation Graphs Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit ... 
- UVALive 6500 Boxes
		Boxes Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit Status Pract ... 
- UVALive 6948  Jokewithpermutation dfs
		题目链接:UVALive 6948 Jokewithpermutation 题意:给一串数字序列,没有空格,拆成从1到N的连续数列. dfs. 可以计算出N的值,也可以直接检验当前数组是否合法. # ... 
随机推荐
- Codeforces Round #323 (Div. 2) C  GCD Table  582A (贪心)
			对角线上的元素就是a[i],而且在所在行和列中最大, 首先可以确定的是最大的元素一定是a[i]之一,这让人想到到了排序. 经过排序后,每次选最大的数字,如果不是之前更大数字的gcd,那么只能是a[i] ... 
- python基础一 day17 复习
			# 迭代器# 生成器进阶 # 内置函数 # 55个 # 带key的 max min filter map sorted # 思维导图上红色和黄色方法必须会用 # 匿名函数 # lambda 参数,参数 ... 
- 2017.12.23   第二章    统一建模语言UML概述
			第二章 统一建模语言UML概述 (1)为什么要建模 模型是某个事物的抽象,其目的是在构建这个事物之前先来理解它,因为模型忽略了那些非本质的细节,这样有利于更好的理解和表示事物: 在软件系统开发之前首先 ... 
- 增强的格式化字符串format函数
			http://blog.csdn.net/handsomekang/article/details/9183303 自python2.6开始,新增了一种格式化字符串的函数str.format(),可谓 ... 
- Cookie 与 Session 的区别
			Cookie与Session的区别 cookie的简介 cookie是Web服务器保存在客户端的一系列文本信息 cookie的作用 对特定对象的追踪 统计网页浏览次数 简化登录 安全性能:容易信息泄露 ... 
- 【贪心  二分图  线段树】cf533A. Berland Miners
			通过霍尔定理转化判定方式的一步还是很妙的 The biggest gold mine in Berland consists of n caves, connected by n - 1 transi ... 
- Java - 网络
			要事为先,你如果想要在这个行业发展下去的话,实际上三角形的三个点在支撑着你发展,一个是技术.一个是管理(不是说管理别人,是管理你自己的时间,管理你自己的精力).还有一个就是沟通,注重这三点均衡的发展. ... 
- HTTP 配置与编译安装
			目录 HTTP 配置与编译安装 HTTP 相关配置 DSO 定义'Main' Server 的文档页面路径 定义站点主页面 站点访问控制常见机制 基于源地址实现访问控制 日志设定 设定默认字符集 定义 ... 
- Openstack搭建(流水账)
			Openstack管理三大资源:1.网络资源2.计算资源3.存储资源 Keystone 做服务注册 Glance 提供镜像服务 Nova 提供计算服务 Nova scheduler决策虚拟主机创建在哪 ... 
- 【CSS】非常简单的css实现div悬浮页面底部
			<div id="demo_div"></div> <style> #demo_div{ left:; position: fixed; bot ... 
