Raphael_W

2013年5月3日 #

UVa 694 The Collatz Sequence

摘要: The Collatz SequenceAn 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. 阅读全文

posted @ 2013-05-03 23:11 Raphael_W 阅读(105) 评论(0) 推荐(0) 编辑

UVa 489 Hangman Judge

摘要: Hangman JudgeIn ``Hangman Judge,'' you are to write a program that judges a series of Hangman games. For each game, the answer to the puzzle is given as well as the guesses. Rules are the same as the classic game of hangman, and are given as follows:The contestant tries to solve to puzzle by 阅读全文

posted @ 2013-05-03 20:46 Raphael_W 阅读(179) 评论(0) 推荐(0) 编辑

UVa 488 Triangle Wave

摘要: Triangle WaveIn this problem you are to generate a triangular wave form according to a specified pair of Amplitude and Frequency.Input and OutputThe input begins with a single positive integer on a line by itself indicating the number of the cases following, each of them as described below. This lin 阅读全文

posted @ 2013-05-03 18:22 Raphael_W 阅读(112) 评论(0) 推荐(0) 编辑

UVa 445 Marvelous Mazes

摘要: Marvelous MazesYour mission, if you decide to accept it, is to create a maze drawing program. A maze will consist of the alphabetic characters A-Z, * (asterisk), and spaces.Input and OutputYour program will get the information for the mazes from the input file. This file will contain lines of charac 阅读全文

posted @ 2013-05-03 15:34 Raphael_W 阅读(140) 评论(0) 推荐(0) 编辑

导航