Description
The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices.
— It i...
分类:
其他好文 时间:
2015-05-04 18:17:41
阅读次数:
94
这一题,主要是数学方面的知识,将ans = n^n进行化简。
两边取log。得到log(ans)= n * log(n);
再推出ans = 10 ^ (n * log (n));10的整数幂,只会在ans后面加上一个0,小数的幂才会影响ans的其他有效数字。
所以求出n * log(n)的小数部分temp,然后(int)10^temp就是所要求的结果。
数学,很重要!!~·
下面的是A...
分类:
其他好文 时间:
2015-05-04 13:57:38
阅读次数:
131
题目:
Given a digit string, return all possible letter combinations that the number could represent.
A mapping of digit to letters (just like on the telephone buttons) is given below.
Input...
分类:
其他好文 时间:
2015-05-04 12:00:15
阅读次数:
107
题目:Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telep...
分类:
其他好文 时间:
2015-05-04 08:37:28
阅读次数:
183
Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephon...
分类:
其他好文 时间:
2015-05-03 20:30:08
阅读次数:
112
#include #include typedef int BOOL;#define true 1#define false 0int main(){ BOOL digit_seen[10] = {false}; int digit; long int n; printf(...
分类:
其他好文 时间:
2015-05-02 11:13:33
阅读次数:
126
Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephon...
分类:
编程语言 时间:
2015-05-02 11:04:18
阅读次数:
161
Description
You are given a car odometer which displays the miles traveled as an integer. The odometer has a defect, however: it proceeds from the digit 1 to the digit 3, from the digit 4 to the di...
分类:
其他好文 时间:
2015-04-28 16:16:02
阅读次数:
167
不用java就用大数模板做见hdu1002,java写很容易 就是超内存!!!
Problem Description
The I-number of x is defined to be an integer y, which satisfied the the conditions below:
1. y>x;
2. the sum of each digit of y(under...
分类:
编程语言 时间:
2015-04-27 16:58:55
阅读次数:
197
题目: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...
分类:
其他好文 时间:
2015-04-26 17:59:43
阅读次数:
116