07 2011 档案
摘要:ConversionsTime Limit:1 Second Memory Limit:32768 KBConversion between the metric and English measurement systems is relatively simple. Often, it involves either multiplying or dividing by a constant. You must write a program that converts between the following units:TypeMetricEnglishequivalentWeigh
阅读全文
摘要:Kinds of FuwasTime Limit:1 Second Memory Limit:32768 KBIn the year 2008, the 29th Olympic Games will be held in Beijing. This will signify the prosperity of China as well as becoming a festival for people all over the world.The official mascots of Beijing 2008 Olympic Games are Fuwa, which are named
阅读全文
摘要:Find All M^N PleaseTime Limit:1 Second Memory Limit:32768 KBRecently, Joey has special interest in the positive numbers that could be represented asM^N(Mto the powerN), whereMandNare both positive integers greater than or equal to 2. For example, 4, 8, 9 and 16 are first four such numbers, as 4 = 2
阅读全文
摘要:在java中有好几种方法可以把一个对象转换成字符串类型,当然每种方法都有自己的用处,但是如果对几种方法的理解不当的话,也可能给debug带来很大的麻烦,最主要是因为这类bug不容易发现,当前我就碰到了,所有写一下记录下来,警戒自己也同路过的朋友们分享一下。大多数类型都会重写toString方法,这个方法当然是首选的转换成字符串的方法,因为他它方便。用这个方法时,主要要注意空指针错误。当对一个对象为null时,调用其toString方法,将得到该错误。
阅读全文
摘要:Easy TaskTime Limit:1 Second Memory Limit:32768 KBCalculating the derivation of a polynomial is an easy task. Given a function f(x) , we use (f(x))' to denote its derivation. We use x^n to denote xn. To calculate the derivation of a polynomial, you should know 3 rules:(1) (C)'=0 where C is a
阅读全文
摘要:ZOJ Problem Set - 2987MisspellingTime Limit:1 Second Memory Limit:32768 KBMisspelling is an art form that students seem to excel at. Write a program that removes thenth character from an input string.InputThe first line of input contains a single integerN, (1 <=N<= 1000) which is the number of
阅读全文
摘要:ZOJ Problem Set - 2965Accurately Say "CocaCola"!Time Limit:1 Second Memory Limit:32768 KBIn a party held by CocaCola company, several students stand in a circle and play a game.One of them is selected as the first, and should say the number 1. Then they continue to count number from 1 one
阅读全文
摘要:ZOJ Problem Set - 2947AbbreviationTime Limit:1 Second Memory Limit:32768 KBWhen a Little White meets another Little White:Little White A: (Surprised) !Little White B: ?Little White A: You Little White know "SHDC"? So unbelievable!Little White B: You are little white! Little white is you! W
阅读全文
摘要:ZOJ Problem Set - 2932The Seven Percent SolutionTime Limit:1 Second Memory Limit:32768 KBUniform Resource Identifiers (or URIs) are strings likehttp://icpc.baylor.edu/icpc/,mailto:foo@bar.org,ftp://127.0.0.1/pub/linux, or even justreadme.txtthat are used to identify a resource, usually on the Intern
阅读全文
摘要:ZOJ Problem Set - 2970Faster, Higher, StrongerTime Limit:1 Second Memory Limit:32768 KBIn the year 2008, the 29th Olympic Games will be held in Beijing. This will signify the prosperity of China and Beijing Olympics is to be a festival for people all over the world as well.The motto of Olympic Games
阅读全文
摘要:Daffodil numberTime Limit:1 Second Memory Limit:32768 KBThe daffodil number is one of the famous interesting numbers in the mathematical world. A daffodil number is a three-digit number whose value is equal to the sum of cubes of each digit.For example. 153 is a daffodil as 153 = 13+ 53+ 33.InputThe
阅读全文