char在C和C+中占一个字节 Java中无论是汉字还是英文字母都是用Unicode编码来表示的,一个Unicode码是16位,每字节是8位,所以一个Unicode码占两字节 /** * The number of bits used to represent a char va...
分类:
编程语言 时间:
2014-08-25 22:37:24
阅读次数:
205
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font ...
分类:
其他好文 时间:
2014-08-25 22:27:24
阅读次数:
315
Description
A square root of a number x is a number
r such that r2 = x. A discrete square root of a non-negative integer
x is a non-negative integer
r such that r2
x mod N , 0r <
N , where ...
分类:
其他好文 时间:
2014-08-25 21:10:04
阅读次数:
252
The .Net framework has a number of technologies that allow you to create HTTP services such as Web Service, WCF and now Web API. There are a lot of ar...
Follow up for N-Queens problem.
Now, instead outputting board configurations, return the total number of distinct solutions.
Java Solutions( Refer to blog
http://blog.csdn.net/mbh_199...
分类:
其他好文 时间:
2014-08-25 19:22:11
阅读次数:
207
http://acm.timus.ru/problem.aspx?space=1&num=1586
题意没看懂,看了别人的翻译。threeprime number的意思是任意三个连续的数组成的一个三位数是素数,注意必须是三位数。给出n,问满足条件的n位数有多少个。
先把三位数的素数筛选出来并标记,设dp[i][j][k]表示到i位为止,最后两位是j和k的满足条件的数的个数。
...
分类:
其他好文 时间:
2014-08-25 19:15:44
阅读次数:
161
Apocalypse Someday
Time Limit: 1000MS
Memory Limit: 131072K
Total Submissions: 1490
Accepted: 686
Description
The number 666 is considered to be the occult “number ...
分类:
其他好文 时间:
2014-08-25 17:07:54
阅读次数:
209
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 at...
分类:
其他好文 时间:
2014-08-25 14:42:24
阅读次数:
138
题目链接The problem is quite simple. You're given a number N and a positive integer K. Tell if N can be represented as a sum of K prime numbers (not neces...
分类:
其他好文 时间:
2014-08-25 13:19:04
阅读次数:
270
Problem 34
145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145.
Find the sum of all numbers which are equal to the sum of the factorial of their digits.
Note: as 1! = 1 and 2! = 2 are...
分类:
其他好文 时间:
2014-08-25 11:59:14
阅读次数:
243