摘要: An Easy TaskProblem DescriptionIgnatius was born in a leap year, so he want to know when he could hold his birthday party. Can you tell him?Given a positive integers Y which indicate the start year, and a positive integer N, your task is to tell the Nth leap year from year Y.Note: if year Y is a lea 阅读全文
posted @ 2011-04-13 21:35 cpoint 阅读(720) 评论(0) 推荐(0) 编辑
摘要: Train Problem IProblem DescriptionAs the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because the trains in the Ignatius Train Station is the fastest all over the world ^v^). But here comes a problem, there is only one railway 阅读全文
posted @ 2011-04-13 21:28 cpoint 阅读(1435) 评论(0) 推荐(0) 编辑
摘要: As Easy As A+BProblem DescriptionThese days, I am thinking about a question, how can I get a problem as easy as A+B? It is fairly difficulty to do such a thing. Of course, I got it after many waking nights.Give you some integers, your task is to sort these number ascending (升序).You should know how e 阅读全文
posted @ 2011-04-13 21:20 cpoint 阅读(835) 评论(0) 推荐(0) 编辑
摘要: Least Common MultipleProblem DescriptionThe least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the set. For example, the LCM of 5, 7 and 15 is 105.InputInput will consist of multiple problem instances. The first line of 阅读全文
posted @ 2011-04-13 21:17 cpoint 阅读(411) 评论(0) 推荐(0) 编辑
摘要: 最小公倍数Problem Description给定两个正整数,计算这两个数的最小公倍数。Input输入包含多组测试数据,每组只有一行,包括两个不大于1000的正整数.Output对于每个测试用例,给出这两个数的最小公倍数,每个实例输出一行。Sample Input10 14Sample Output70SourcePOJRecommendEddyAC code:#include<stdio.h>#include<math.h>intgcd(inta,intb)//求最大公约数函数{intr;while(b){r=a%b;a=b;b=r;}returna;}intmai 阅读全文
posted @ 2011-04-13 21:12 cpoint 阅读(563) 评论(0) 推荐(0) 编辑
摘要: A hard puzzleProblem Descriptionlcy gives a hard puzzle to feng5166,lwg,JGShining and Ignatius: gave a and b,how to know the a^b.everybody objects to this BT problem,so lcy makes the problem easier than begin.this puzzle describes that: gave a and b,how to know the a^b's the last digit number.Bu 阅读全文
posted @ 2011-04-13 21:10 cpoint 阅读(388) 评论(0) 推荐(0) 编辑
摘要: N!Problem DescriptionGiven an integer N(0 ≤ N ≤ 10000), your task is to calculate N!InputOne N in one line, process to the end of file.OutputFor each N, output N! in one line.Sample Input123Sample Output126AuthorJGShining(极光炫影)AC code:#include<stdio.h>intmain(){inta[10000];inti,j,c,m,n;while(s 阅读全文
posted @ 2011-04-13 21:07 cpoint 阅读(601) 评论(0) 推荐(0) 编辑
摘要: u Calculate eProblem DescriptionA simple mathematical formula for e iswhere n is allowed to go to infinity. This can actually yield very accurate approximations of e using relatively small values of n.OutputOutput the approximations of e generated by the above formula for the values of n from 0 to 9 阅读全文
posted @ 2011-04-13 21:04 cpoint 阅读(467) 评论(0) 推荐(0) 编辑
摘要: Fibonacci AgainProblem DescriptionThere are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2).InputInput consists of a sequence of lines, each containing an integer n. (n < 1,000,000).OutputPrint the word "yes" if 3 divide evenly into F(n).Print th 阅读全文
posted @ 2011-04-13 20:58 cpoint 阅读(383) 评论(0) 推荐(0) 编辑
摘要: ElevatorProblem DescriptionThe highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 seconds to move the elevator up one floor, and 4 seconds to move down one fl 阅读全文
posted @ 2011-04-13 20:52 cpoint 阅读(348) 评论(0) 推荐(0) 编辑
浏览次数:travelocity promotion codes