基本思路:(参考大神和加自己的思考) 考虑到此题需要输入这么大的数a,并且还的求aa,求出来会更大,更多位。当时考虑用大数方法求(数组实现),结果实现不行。看网上大神采用对数法,巧妙避开处理这么大的数。 这就是数学的魅力!! 假如aa=b,两边同时取对数alog10a=log10b,从而有b=10a ...
分类:
其他好文 时间:
2016-09-14 20:32:05
阅读次数:
152
Backward Digit Sums Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6350 Accepted: 3673 Description FJ and his cows enjoy playing a mental ...
分类:
其他好文 时间:
2016-09-13 01:28:31
阅读次数:
304
Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit is a ...
分类:
其他好文 时间:
2016-09-11 22:54:12
阅读次数:
156
题目: Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is l ...
分类:
其他好文 时间:
2016-09-11 09:00:20
阅读次数:
107
Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: ...
分类:
其他好文 时间:
2016-09-11 06:48:43
阅读次数:
146
Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit is a ...
分类:
其他好文 时间:
2016-09-10 09:00:14
阅读次数:
171
Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: ...
分类:
其他好文 时间:
2016-09-04 23:53:01
阅读次数:
166
Your task is simple:Find the first two primes above 1 million, whose separate digit sums are also prime.As example take 23, which is a prime whose dig ...
分类:
其他好文 时间:
2016-09-04 16:04:31
阅读次数:
197
Div1 300 RectangularGrid 题意:给定一个长方形,问包含有多少不是正方形的小长方形 题解:枚举小长方形的长宽即可 Div1 600 Masterbrain 题意:略 题解:主要是卡题意,以及“No digit in either a guess or a secret comb ...
分类:
其他好文 时间:
2016-09-03 00:57:31
阅读次数:
282
要想使用好grep、sed、awk的各种功能,必须把正则表达式了解清楚。正则表达式分为两类:基本正则表达式:BRE扩展正则表达式:ERE基本正则表达式的元字符:字符匹配:.:匹配任意单个字符;[]:匹配指定范围内的任意单个字符[^]:匹配指定范围外的任意单个字符[:digit:],[:upper..
分类:
其他好文 时间:
2016-09-02 01:05:09
阅读次数:
215