摘要: DescriptionWe all love recursion! Don't we?Consider a three-parameter recursive function w(a, b, c):if a 20 or b > 20 or c > 20, then w(a, b, c) retu... 阅读全文
posted @ 2015-09-27 16:38 Wei_java 阅读(303) 评论(0) 推荐(0)
摘要: 题目大意:给定一个正整数,根据一定的规则求出该数的“数根”,其规则如下:例如给定数字24,将24的各个位上的数字“分离”,分别得到数字2和4,而2+4=6;因为610;所以依据规则再对12进行相应的运算,最后得到数字3,而3 2 #include 3 #include 4 using namesp... 阅读全文
posted @ 2015-09-27 15:28 Wei_java 阅读(310) 评论(0) 推荐(0)