In the partime, a simle program attracted my attention whose content is to change number to english by reading rule of money.It took about one hour to deal with this question.
Now the source was sh...
分类:
其他好文 时间:
2014-08-14 01:30:57
阅读次数:
268
实现如下:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ public class Number { public str...
分类:
其他好文 时间:
2014-08-14 01:23:47
阅读次数:
202
Or,How to use variable length argument lists in Python.The special syntax,*argsand**kwargsin function definitions is used to pass a variable number of...
分类:
编程语言 时间:
2014-08-14 01:16:17
阅读次数:
388
Minimum Inversion Number
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 10853 Accepted Submission(s): 6676
Problem Description
...
分类:
其他好文 时间:
2014-08-13 22:38:27
阅读次数:
332
Description
Problem G - Great Numbers
In this problem you have to count the number of great numbers of length n. Here a great number must have the following property:
the number must be divis...
分类:
其他好文 时间:
2014-08-13 22:35:27
阅读次数:
219
题意:
有一个数n,问有多少个进制x(基数)使得n转换为x进制后的数字中只有3、4、5、6四个数。
算法:
对于只有一位数的情况,显然3、4、5、6都应该输出-1.
如果有2位数,假设这2位中高位为a,低位为b,进制为base,则 n = a * base + b,解一元一次方程即可。
如果有3位数,假设这3为从高到低分别为a、b、c,进制为base,则 ...
分类:
其他好文 时间:
2014-08-13 22:34:07
阅读次数:
342
头文件中有一个重要的函数 rand() , 可以作为随机数发生器。
现在现在我想产生一个随机数, 我使用如下的程序:
#include
#include
using namespace std;
int main()
{
cout << rand() << endl;
return 0;
}
问题来了, 虽然我们产生了一个随机数, 但是无论我运...
分类:
编程语言 时间:
2014-08-13 22:27:07
阅读次数:
313
题意:给你一个数n (1- 1e12),问你有多少种进制使得 这个数用这个进制表示只有 3 . 4 . 5. 6 这4个数解题思路:这里本来是想要枚举的,发现数太大了,这里利用到了一中很巧妙的优化方法,将 2位 和3位转化成为 一元一次 和一元二次方程,就可以有很大的优化,然后只需要枚举到7000即...
分类:
其他好文 时间:
2014-08-13 22:06:17
阅读次数:
192
Kaka's Matrix Travels
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 7743
Accepted: 3111
Description
On an N × N chessboard with a non-negative number i...
分类:
其他好文 时间:
2014-08-13 18:54:17
阅读次数:
244
Problem DescriptionA number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.Given A, B, and n, you are t...
分类:
其他好文 时间:
2014-08-13 18:43:47
阅读次数:
209