每次看python，都想利用树莓派的GPIO玩LED小灯，果然是寒假无聊，买了GPIO的扩展版和小灯。RPi.GPIO是Python库，简单测试有用...
Continue Reading

A+B for Input-Output Practice (I)Problem DescriptionYour task is to Calculate a + b.Too easy?! Of course! I specially designed the problem for acm beginners.You must have found that some problems have the same titles with this one, yes, all these problems were designed for the same aim.
InputThe input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line.
OutputFor each pair of input integers a and b you should output the sum of a and b in one line, and with one line of output for each line in input.
Continue Reading

Sum ProblemProblem DescriptionHey, welcome to HDOJ(Hangzhou Dianzi University Online Judge).
In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + … + n.
InputThe input will consist of a series of integers n, one integer per line.
OutputFor each case, output SUM(n) in one line, followed by a blank line. You may assume the result will be in the range of 32-bit signed integer.
Continue Reading

A + B ProblemCalculate a + b
InputThe input will consist of a series of pairs of integers a and b,separated by a space, one pair of integers per line.
OutputFor each pair of input integers a and b you should output the sum of a and b in one line,and with one line of output for each line in input.
Continue Reading