01 2013 档案

494 - Kindergarten Counting Game
摘要:Everybody sit down in a circle. Ok. Listen to me carefully.``Woooooo, you scwewy wabbit!''Now, could someone tell me how many words I just said?Input and OutputInput to your program will consist of a series of lines, each line containing multiple words (at least one). A ``word'' is d 阅读全文

posted @ 2013-01-31 15:41 喂喂还债啦 阅读(298) 评论(0) 推荐(0)

694 - The Collatz Sequence
摘要:An algorithm given by Lothar Collatz produces sequences of integers, and is described as follows:Step 1:Choose an arbitrary positive integer A as the first item in the sequence.Step 2:If A = 1 then stop.Step 3:If A is even, then replace A by A / 2 and go to step 2.Step 4:If A is odd, then replace A 阅读全文

posted @ 2013-01-31 15:09 喂喂还债啦 阅读(446) 评论(0) 推荐(0)

458 - The Decoder
摘要:Write a complete program that will correctly decode a set of characters into a valid message. Your program should read a given file of a simple coded set of characters and print the exact message that the characters contain. The code key for this simple coding is a one for one character substitution 阅读全文

posted @ 2013-01-30 21:06 喂喂还债啦 阅读(289) 评论(0) 推荐(0)

10071 - Back to High School Physics
摘要:A particle has initial velocity and constant acceleration. If its velocity after certain time is v then what will its displacement be in twice of that time?InputThe input will contain two integers in each line. Each line makes one set of input. These two integers denote the value of v (-100 <= v 阅读全文

posted @ 2013-01-30 20:41 喂喂还债啦 阅读(151) 评论(0) 推荐(0)

10019 - Funny Encryption Method
摘要:The ProblemHistory : A student from ITESM Campus Monterrey plays with a new encryption method for numbers. These method consist of the following steps:Steps : Example 1) Read the number N to encrypt M = 265 2) Interpret N as a decimal number X1= 265 (decimal) 3) Convert the decimal interpretation of 阅读全文

posted @ 2013-01-30 20:18 喂喂还债啦 阅读(237) 评论(0) 推荐(0)

10055 - Hashmat the Brave Warrior
摘要:Hashmat is a brave warrior who with his group of young soldiers moves from one place to another to fight against his opponents. Before fighting he just calculates one thing, the difference between his soldier number and the opponent's soldier number. From this difference he decides whether to fi 阅读全文

posted @ 2013-01-30 20:18 喂喂还债啦 阅读(142) 评论(0) 推荐(0)

10300 - Ecological Premium
摘要:German farmers are given a premium depending on the conditions at their farmyard. Imagine the following simplified regulation: you know the size of each farmer's farmyard in square meters and the number of animals living at it. We won't make a difference between different animals, although t 阅读全文

posted @ 2013-01-30 20:16 喂喂还债啦 阅读(437) 评论(0) 推荐(0)