摘要: Problem Description Given a positive integer N, you should output the leftmost digit of N^N. 阅读全文
posted @ 2013-08-31 09:54 兰幽 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 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 兰幽 阅读(293) 评论(0) 推荐(0) 编辑
摘要: 杭电题目分类 阅读全文
posted @ 2013-08-30 15:18 兰幽 阅读(501) 评论(0) 推荐(0) 编辑
摘要: 在2×n的一个长方形方格中,用一个1× 2的骨牌铺满方格,输入n ,输出铺放方案的总数. 例如n=3时,为2× 3方格,骨牌的铺放方案有三种,如下图: 阅读全文
posted @ 2013-08-29 21:52 兰幽 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 网上流传一句话:"常在网上飘啊,哪能不挨刀啊~"。其实要想能安安心心地上网其实也不难,学点安全知识就可以。 阅读全文
posted @ 2013-08-29 20:55 兰幽 阅读(301) 评论(0) 推荐(0) 编辑
摘要: “回文串”是一个正读和反读都一样的字符串,比如“level”或者“noon”等等就是回文串。请写一个程序判断读入的字符串是否是“回文”。 阅读全文
posted @ 2013-08-28 22:45 兰幽 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 查找最大元素 阅读全文
posted @ 2013-08-28 00:02 兰幽 阅读(366) 评论(0) 推荐(0) 编辑