上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 49 下一页
摘要: 时间限制 3000 ms 内存限制 32768 KB 代码长度限制 100 KB 题目描述NowCoder最近在研究一个数列:* F(0) = 7* F(1) = 11* F(n) = F(n-1) + F(n-2) (n≥2)他称之为NowCoder数列。请你帮忙确... 阅读全文
posted @ 2018-11-27 22:43 black_hole6 阅读(261) 评论(0) 推荐(0)
摘要: 题目描述对一个给定的自然数MM,求出所有的连续的自然数段,这些连续的自然数段中的全部数之和为MM。例子:1998+1999+2000+2001+2002 = 100001998+1999+2000+2001+2002=10000,所以从19981998到2002200... 阅读全文
posted @ 2018-11-27 09:37 black_hole6 阅读(219) 评论(0) 推荐(0)
摘要: 题目描述输入22个正整数x_0,y_0(2 \le x_0#include#include#includeusing namespace std;int main(){ int n,m; int cnt=0; cin>>n>>m; for(int t=n;t<=m;... 阅读全文
posted @ 2018-11-26 21:38 black_hole6 阅读(291) 评论(1) 推荐(0)
摘要: Diophantus of Alexandria was an egypt mathematician living in Alexandria. He was one of the first mathematicians to study equations wh... 阅读全文
posted @ 2018-11-26 20:32 black_hole6 阅读(174) 评论(0) 推荐(0)
摘要: 题目描述如题,给定一个范围N,你需要处理M个某数字是否为质数的询问(每个数字均在范围1-N内)输入输出格式输入格式: 第一行包含两个正整数N、M,分别表示查询的范围和查询的个数。接下来M行每行包含一个不小于1且不大于N的整数,即询问该数是否为质数。 输出格式: 输出包... 阅读全文
posted @ 2018-11-26 18:49 black_hole6 阅读(666) 评论(1) 推荐(1)
摘要: 欧拉函数 编辑在数论,对正整数n,欧拉函数是小于n的正整数中与n互质的数的数目(φ(1)=1)。此函数以其首名研究者欧拉命名(Euler's totient function),它又称为Euler's totient function、φ函数、欧拉商数等。 例如φ(8... 阅读全文
posted @ 2018-11-25 17:43 black_hole6 阅读(196) 评论(0) 推荐(0)
摘要: 当你试图登录某个系统却忘了密码时,系统一般只会允许你尝试有限多次,当超出允许次数时,账号就会被锁死。本题就请你实现这个小功能。输入格式:输入在第一行给出一个密码(长度不超过 20 的、不包含空格、Tab、回车的非空字符串)和一个正整数 N(≤ 10),分别是正确的密码... 阅读全文
posted @ 2018-11-25 13:14 black_hole6 阅读(147) 评论(0) 推荐(0)
摘要: Little girl Margarita is a big fan of competitive programming. She especially loves problems about arrays and queries on them. Recently, she was prese 阅读全文
posted @ 2018-11-24 17:12 black_hole6 阅读(255) 评论(0) 推荐(0)
摘要: Petya is having a party soon, and he has decided to invite his nn friends. He wants to make invitations in the form of origami. For each invitation, h 阅读全文
posted @ 2018-11-24 17:11 black_hole6 阅读(236) 评论(0) 推荐(0)
摘要: Little girl Margarita is a big fan of competitive programming. She especially loves problems about arrays and queries on them.Recently... 阅读全文
posted @ 2018-11-24 17:05 black_hole6 阅读(140) 评论(0) 推荐(0)
上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 49 下一页