我的代码游记

归档 · 2014

首页

关于

归档

杭电HDU

1094.A+B for Input-Output Practice (VI)

Problem Problem DescriptionYour task is to calculate the sum of some integers.InputInput contains multiple test cases, and one case one line. Each case starts with an integer N, and then N integers follow in the same line.OutputFor each test case you should output the sum of N integers in one line, and with one line of output for each line in input.Sample ..

更多
杭电HDU

1096.A+B for Input-Output Practice (VIII)

Problem Problem DescriptionYour task is to Calculate the sum of some integers.InputInput contains multiple test cases. Each test case contains a integer N, and then N integers follow in the same line. A test case starting with 0 terminates the input and this test case is not to be processed.OutputFor each group of input integers you should output their sum..

更多
杭电HDU

1720.A+B Coming

Problem Problem DescriptionMany classmates said to me that A+B is must needs.If you can’t AC this problem, you would invite me for night meal. ^_^InputInput may contain multiple test cases. Each case contains A and B in one line.A, B are hexadecimal number.Input terminates by EOF.OutputOutput A+B in decimal number in one line.Sample Input1 9A Ba bSample Ou..

更多
杭电HDU

1279.验证角谷猜想

Problem Problem Description数论中有许多猜想尚未解决,其中有一个被称为“角谷猜想”的问题,该问题在五、六十年代的美国多个著名高校中曾风行一时,这个问题是这样描述的:任何一个大于一的自然数,如果是奇数,则乘以三再加一;如果是偶数,则除以二;得出的结果继续按照前面的规则进行运算,最后必定得到一。现在请你编写一个程序验证他的正确性。Input本题有多个测试数据组,第一行为测试数据组数N,接着是N行的正整数。Output输出验证“角谷猜想”过程中的奇数,最后得到的1不用输出;每个测试题输出一行;每行中只有两个输出之间才能有一个空格;如果没有这样的输出,则输出:No number can be output !。Sample Input4591611Sample Output59 7 11 ..

更多
123