CDOJ 1272 Final Pan's prime numbers
有些问题,不做实践与猜测,可能一辈子也想不出答案,例如这题。
#include<stdio.h>
#include<math.h> long long x; int main()
{
while(~scanf("%lld",&x)){
if(x<) printf("-1\n");
else printf("7\n");
}
return ;
}
CDOJ 1272 Final Pan's prime numbers的更多相关文章
- UESTC 1272 Final Pan's prime numbers(乱搞)
题目链接 Description Final Pan likes prime numbers very much. One day, he want to find the super prime n ...
- UESTC--1272--Final Pan's prime numbers(水题)
Final Pan's prime numbers Time Limit: 1000MS Memory Limit: 65535KB 64bit IO Format: %lld & % ...
- algorithm@ Sieve of Eratosthenes (素数筛选算法) & Related Problem (Return two prime numbers )
Sieve of Eratosthenes (素数筛选算法) Given a number n, print all primes smaller than or equal to n. It is ...
- Sum of Consecutive Prime Numbers(poj2739)
Sum of Consecutive Prime Numbers Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 22019 Ac ...
- POJ 2739. Sum of Consecutive Prime Numbers
Sum of Consecutive Prime Numbers Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 20050 ...
- POJ 2739 Sum of Consecutive Prime Numbers(尺取法)
题目链接: 传送门 Sum of Consecutive Prime Numbers Time Limit: 1000MS Memory Limit: 65536K Description S ...
- HDOJ(HDU) 2138 How many prime numbers(素数-快速筛选没用上、)
Problem Description Give you a lot of positive integers, just to find out how many prime numbers the ...
- Codeforces 385C Bear and Prime Numbers
题目链接:Codeforces 385C Bear and Prime Numbers 这题告诉我仅仅有询问没有更新通常是不用线段树的.或者说还有比线段树更简单的方法. 用一个sum数组记录前n项和, ...
- POJ2739 Sum of Consecutive Prime Numbers(尺取法)
POJ2739 Sum of Consecutive Prime Numbers 题目大意:给出一个整数,如果有一段连续的素数之和等于该数,即满足要求,求出这种连续的素数的个数 水题:艾氏筛法打表+尺 ...
随机推荐
- 首次编译TI Android JB-4.2.2-DevKit-4.1.1的时候提示jdk版本不对
http://processors.wiki.ti.com/index.php/TI-Android-JB-4.2.2-DevKit-4.1.1_DeveloperGuide#Configure_An ...
- android平台编译IW
不知道怎么编译IW,所以就搜索网络上的博客http://blog.csdn.net/jksl007/article/details/16862435 首先,iw依赖于libnl库,而目前android ...
- replication across two data centers
http://andyhan.net/index.php/sys-adm/item/291-hbase-replication http://shitouer.cn/2013/04/hbase-mul ...
- 巧妙使用Contains()方法查找一个数是否在某堆数中
问题:要判断用户输入的一个数,或者是程序里方法的一个参数的值,或者是一个变量的值是否在某堆数中. 简洁写法:把这堆数放在list中,使用list的Contains()方法检查list是否包含这个数,取 ...
- remote staspack
输入文件:$HOME/utility/statspack11g/statspack.env, $HOME/utility/statspack11g/dblist,$HOME/utility/stats ...
- 【素数】 poj 2739 一个数能有多少种连续素数相加方案
简单题 素数打表 根据数据量 用n2算法遍历 开一个save[k]素数存前k个素数和即可. #include <iostream> #include <cstdio> ...
- mysql主从数据库
Mysql主从配置,实现读写分离 大型网站为了软解大量的并发访问,除了在网站实现分布式负载均衡,远远不够.到了数据业务层.数据访问层,如果还是传统的数据结构,或者只是单单靠一台服务器扛,如此多的数据库 ...
- 导出Excel数据
先要导入jxl架包,其中的abc.xls为测试Excel,具体代码如下,仅供参考: import java.io.File; import java.io.FileInputStream; impor ...
- hiho 1015 KMP
input 1<=T<=20 string1 1<=strlen(string1)<=1e4 string2 2<=strlen(string2)<=1e6 out ...
- couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145
当直接执行./mongo 出现这样的提示:couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145 解决: ...