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 题目大意:给出一个整数,如果有一段连续的素数之和等于该数,即满足要求,求出这种连续的素数的个数 水题:艾氏筛法打表+尺 ...
随机推荐
- redis配置密码认证
redis配置密码 1.通过配置文件进行配置yum方式安装的redis配置文件通常在/etc/redis.conf中,打开配置文件找到 ? 1 #requirepass foobared 去掉行前的注 ...
- go share library
http://blog.ralch.com/tutorial/golang-sharing-libraries/ Sharing Golang packages to C and Go Sun, Au ...
- SQL 合并列值和拆分列值
合并列值 表结构,数据如下: id value ----- ------ aa bb aaa bbb ccc 需要得到结果: id values ------ ----------- aa,bb aa ...
- jsp:usebean 常用注意事项
bean就是一个Java类,一般来说写这个类应该注意以下几点: 1.必须有包名,不要使用裸类 2.类的第一个名字小写 3.尽量不要使用公共成员变量,使用私有的,通过set.get方法来操作类中的变量 ...
- 【java图形计算器】 java awt swing组件应用
package package1; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swi ...
- hibernate缓存机制(二级缓存)
一.why(为什么要用Hibernate缓存?) Hibernate是一个持久层框架,经常访问物理数据库. 为了降低应用程序对物理数据源访问的频次,从而提高应用程序的运行性能. 缓存内的数据是对物理数 ...
- android执行外部命令、检测文件是否存在、自动检测U盘路径
private final String UDiskFileName = "/2969_logo/bootfile.image"; private final String Loc ...
- GameUnity 2.0 文档(四) 网格+四叉树 最优碰撞检测
在写之前,必须对 前一篇文档补充一下. Camera2DAngle类是 摄像机旋转 2d人物360度,PlayerMove是人物移动. 这两个类 都可以 360 ° 场景旋转人物也跟着旋转. 但不能 ...
- ajax2016/4/15 post与get
post方式,数据放在send()里面作为参数传递 xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded'); ...
- margin叠加相邻两个元素的上下margin是叠加在一起
<!doctype html><html><head><meta charset="utf-8"><title>无标题文 ...