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 题目大意:给出一个整数,如果有一段连续的素数之和等于该数,即满足要求,求出这种连续的素数的个数 水题:艾氏筛法打表+尺 ...
随机推荐
- CLR 无法从 COM
上下文 0x50ece80 转换为 COM 上下文 0x50ecf38,这种状态已持续 60 秒.拥有目标上下文/单元的线程很有可能执行的是非泵式等待或者在不发送 Windows 消息的情况下处理一个 ...
- AVFoundation(二)---MPMusicPlayerController
话不多说,直接上代码,代码中详细介绍了如何初始化,并设置一些常用的属性. /** * MPMusicPlayerController用于播放音乐库中的音乐 */ /** * 初始化MPMusicPla ...
- ant android打包--学习第一弹
1. 准备工作 用eclipse创建一个android项目 安装ant和SDK,并且添加到系统环境变量 2.ant 使用 2.1 ant简单的帮助命令 ant -p 2.2 创建ant配置文件%AND ...
- cakephp 复杂查询
$now = time(); $this->CardTypeInfos->recursive = -1; $conditions = [ 'seller_id'=>SELLER_ID ...
- Apache 的常见问题
Apache "No services installed"问题的处理以及Apache提示 the requested operation has failed而无法启动 安装完 ...
- 字符串编码问题(Ascii、Unicode、UCS-2、GBK、UTF-8)
1.字符编码的发展 第一阶段:ASCII阶段,(American Standard Code for Information Interchange, "美国信息交换标准码),计算机当时只支 ...
- 用for、while、do-while循环输出10句“好好学习,天天向上!”
#include "stdio.h" void main() { int time; ;time<=;time++) printf("%d.好好学习,天天向上!\n ...
- wifi 3G 流量
// // flowStatis.c // Test // // Created by iXcoder on 12-7-19. // Copyright (c) 2012年 iXcoder. ...
- TriggerPrefab 拖拽物体
模拟经营类游戏 有一个特点,就是 拖拽物体.常见的有<帝国><红警><部落战争><凯撒大帝>等等 2d 拖拽 大部分都是 用 OnDrag 方法来 拖动 ...
- java.lang.IllegalArgumentException: Can't convert argument: null
出现这样的异常:: 这是由于eclipse在修改项目名的时候,eclipse自动更新部署了web.xml文件 并且重新生成了xml文件的头部声明. 新增了java的命名把这个javaee去掉就可以了. ...