上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 16 下一页
摘要: Fibonacci again and again 任何一个大学生对菲波那契数列(Fibonacci numbers)应该都不会陌生,它是这样定义的: F(1)=1; F(2)=2; F(n)=F(n-1)+F(n-2)(n>=3); 所以,1,2,3,5,8,13……就是菲波那契数列。 在HDOJ 阅读全文
posted @ 2018-01-31 23:48 TTTCoder 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 推论:小于N且与N互质的所有数的和(包括1)为 N*vola(N)/2 Given a positive integer N, your task is to calculate the sum of the positive integers less than N which are not c 阅读全文
posted @ 2018-01-27 01:10 TTTCoder 阅读(203) 评论(0) 推荐(0) 编辑
摘要: The input contains N natural (i.e. positive integer) numbers ( N <= 10000 ). Each of that numbers is not greater than 15000. This numbers are not nece 阅读全文
posted @ 2018-01-27 01:04 TTTCoder 阅读(268) 评论(0) 推荐(0) 编辑
摘要: The branch of mathematics called number theory is about properties of numbers. One of the areas that has captured the interest of number theoreticians 阅读全文
posted @ 2018-01-25 12:13 TTTCoder 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 原题链接http://codeforces.com/contest/897/problem/C What are you doing at the end of the world? Are you busy? Will you save us? 原题链接http://codeforces.com/ 阅读全文
posted @ 2017-12-06 21:00 TTTCoder 阅读(273) 评论(0) 推荐(0) 编辑
摘要: While Vasya finished eating his piece of pizza, the lesson has already started. For being late for the lesson, the teacher suggested Vasya to solve on 阅读全文
posted @ 2017-11-29 20:47 TTTCoder 阅读(299) 评论(0) 推荐(0) 编辑
摘要: Recenlty Luba got a credit card and started to use it. Let's consider n consecutive days Luba uses the card. She starts with 0 money on her account. I 阅读全文
posted @ 2017-11-25 15:26 TTTCoder 阅读(434) 评论(0) 推荐(0) 编辑
摘要: lily的好朋友xiaoou333最近很空,他想了一件没有什么意义的事情,就是统计一篇文章里不同单词的总数。下面你的任务是帮助xiaoou333解决这个问题。 Input有多组数据,每组一行,每组就是一篇小文章。每篇小文章都是由小写字母和空格组成,没有标点符号,遇到#时表示输入结束。Output每组 阅读全文
posted @ 2017-11-02 21:01 TTTCoder 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 4009: Doges 题目描述 在一个遥远的地方,住着n只 Doge,它们分别被编号为1到n之间的正整数。 有一天,一个叫 Jrisme 的人来到这里,进行了一些「虐狗」行为。具体的,Jrisme 每次会虐编号连续的一些 Doge。现给出每次虐狗的区间,求最幸运(被虐次数最多)Doge 被虐了多少 阅读全文
posted @ 2017-10-31 21:53 TTTCoder 阅读(1978) 评论(0) 推荐(0) 编辑
摘要: Crossing River A group of N people wishes to go across a river with only one boat, which can at most carry two persons. Therefore some sort of shuttle 阅读全文
posted @ 2017-10-29 21:10 TTTCoder 阅读(267) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 16 下一页