摘要: Problem Description Hey, welcome to HDOJ(Hangzhou Dianzi University Online Judge). In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + ... + n. 阅读全文
posted @ 2013-09-06 23:12 兰幽 阅读(222) 评论(0) 推荐(0) 编辑
摘要: Problem Description The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital root. If the resulting value contains two or more digits, those digits are summed and the process is repeated. This is continued as long as necessary to obtain a single digit. For example, consider the positive integer 24. Adding the 2 and the 4 yields a value of 6. Since 6 is a single digit, 6 is the digital root of 阅读全文
posted @ 2013-09-06 22:49 兰幽 阅读(307) 评论(0) 推荐(0) 编辑
摘要: Problem Description HD1000A + B Problem Calculate A + B. Input 阅读全文
posted @ 2013-09-06 22:32 兰幽 阅读(316) 评论(0) 推荐(0) 编辑