{ID:anniel11PROG:castleLANG:PASCAL}var a:array[0..50,0..50 ,1..4] of boolean; component:array[0..50,0..50] of integer;//which room does it belo...
分类:
其他好文 时间:
2015-02-22 07:50:51
阅读次数:
234
Given any positive integer N, you are supposed to find all of its prime factors, and write them in the format N = p1^k1 * p2^k2 *…*pm^km. Input Specif...
分类:
其他好文 时间:
2015-02-21 11:59:24
阅读次数:
182
1 怎样将字串 String 转换成整数 int?A. 有两个方法:1). int i = Integer.parseInt([String]); 或i = Integer.parseInt([String],[int radix]);2). int i = Integer.valueOf(my_s...
分类:
编程语言 时间:
2015-02-21 11:56:56
阅读次数:
253
Find The Multiple
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 19272
Accepted: 7813
Special Judge
Description
Given a positive integer n, write ...
分类:
其他好文 时间:
2015-02-21 09:47:09
阅读次数:
139
The task is simple: given any positive integer N, you are supposed to count the total number of 1's in the decimal form of the integers from 1 to N. F...
分类:
其他好文 时间:
2015-02-20 11:53:35
阅读次数:
249
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.
Given an integer n, return all distinct solutions to the n-queens puzzle.
...
分类:
编程语言 时间:
2015-02-20 09:44:13
阅读次数:
171
五种基本对象类型
字符串(string)
使用’’或” ”括起来
整数(integer)
十进制:123, 八进制:025, 十六进制0x15
浮点数(float)
2.13, 2., .21, 2.1E1
布尔数(boolean)
True, False
复数(complex)
1+2j
通过type()可查看对象类型。
type(2)...
分类:
编程语言 时间:
2015-02-19 12:56:04
阅读次数:
222
For any 4-digit integer except the ones with all the digits being the same, if we sort the digits in non-increasing order first, and then in non-decre...
分类:
其他好文 时间:
2015-02-19 12:54:32
阅读次数:
138
就像这道题的题目一样,真的是一个简单的题目,题意就是一句话:给一个数N求符合公式N = O * 2P的 O 和 P。下面我们就一起看一下题吧。DescriptionGiven a positive integer n and the odd integer o and the nonnegative integer p such that n = o2^p.ExampleFor n = 24, o...
分类:
其他好文 时间:
2015-02-19 00:18:53
阅读次数:
226
Given a positive integer, return its corresponding column title as appear in an Excel sheet.
For example:
1 -> A
2 -> B
3 -> C
...
26 -> Z
27 -> AA
28 -> AB
思路:Beca...
分类:
其他好文 时间:
2015-02-18 17:41:13
阅读次数:
214