摘要: An inch worm is at the bottom of a well n inches deep. It has enough energy to climb u inches every minute, but then has to rest a minute before climbing again. During the rest, it slips down d inches. The process of climbing and resting then repeats. How long before the worm climbs out of the well? We'll always count a portion of a minute as a whole minute and if the worm just reaches the top of the well at the end of its climbing, we'll assume the worm makes it out. 阅读全文
posted @ 2013-08-30 22:01 兰幽 阅读(251) 评论(0) 推荐(0) 编辑
摘要: Ignatius 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. 阅读全文
posted @ 2013-08-30 21:33 兰幽 阅读(202) 评论(0) 推荐(0) 编辑
摘要: Larry graduated this year and finally has a job. He’s making a lot of money, but somehow never seems to have enough. Larry has decided that he needs to grab hold of his financial portfolio and solve his financing problems. The first step is to figure out what’s been going on with his money. Larry has his bank account statements and wants to see how much money he has. Help Larry by writing a program to take his closing balance from each of the past twelve months and calculate his average account 阅读全文
posted @ 2013-08-30 17:01 兰幽 阅读(175) 评论(0) 推荐(0) 编辑
摘要: We all know that Bin-Laden is a notorious terrorist, and he has disappeared for a long time. But recently, it is reported that he hides in Hang Zhou of China! “Oh, God! How terrible! ” 阅读全文
posted @ 2013-08-30 16:55 兰幽 阅读(294) 评论(0) 推荐(0) 编辑
摘要: 杭电题目分类 阅读全文
posted @ 2013-08-30 15:18 兰幽 阅读(501) 评论(0) 推荐(0) 编辑