Problem Descriptionwe define f(A) = 1, f(a) = -1, f(B) = 2, f(b) = -2, ... f(Z) = 26, f(z) = -26;Give you a letter x and a number y , you should outpu...
分类:
其他好文 时间:
2014-10-29 01:56:59
阅读次数:
154
Description
Kitty is a little cat. She is crazy about a game recently.
There are n scenes in the game(mark from 1 to n). Each scene has a number pi. Kitty's score will become least_common_multiple...
分类:
其他好文 时间:
2014-10-29 00:23:31
阅读次数:
225
Problem DescriptionGive you a number on base ten,you should output it on base two.(0 2 3 int main(){ 4 int number; 5 char result[20]; 6 ...
分类:
其他好文 时间:
2014-10-28 23:49:48
阅读次数:
235
问题描述:
Validate if a given string is numeric.
Some examples:
"0" => true
" 0.1 " => true
"abc" => false
"1 a" => false
"2e10" => true
Note: It is intended for the problem statement to be am...
分类:
其他好文 时间:
2014-10-28 21:52:13
阅读次数:
192
此题和上题略有不同,但是大体差不多,不过要把题意转换过来,题目大体意思为, 输入n, 也就是n个数,这些数为0 - (n-1), 这些数刚开始给定输入的顺序, 然后求他的逆序数,然后接着把第一个移到这个数列的末尾,这时候再求出一个逆序数,直到移动一个周期,也就是移动了n次, 求他们之中的最小的一个逆...
分类:
其他好文 时间:
2014-10-28 21:37:56
阅读次数:
254
问题描述:
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 the head of the list.
代码:
...
分类:
其他好文 时间:
2014-10-28 17:49:25
阅读次数:
147
CREATE OR REPLACE FUNCTION FUN_GET_HOUR(STARTTIME IN VARCHAR2,ENDTIME IN VARCHAR2)RETURN NUMBERISN_DAY NUMBER;--相隔天数V_START_DAY VARCHAR2(10):=SUBSTR(S...
分类:
其他好文 时间:
2014-10-28 17:33:16
阅读次数:
297
1.if...elif...else... 1 number = 23 2 guess = int(raw_input('Enter an integer : ')) 3 4 if guess == number: 5 print( 'Congratulations, you guesse...
分类:
编程语言 时间:
2014-10-28 15:22:41
阅读次数:
188
排列组合是数学中的一个分支,在计算机编程方面也有很多的应用,主要有排列公式和组合公式,错排公式、母函数、Catalan Number(卡特兰数)等。
一、有关组合数学的公式
1、排列公式 P(n,r)=n!/r!
2、组合公式 C(n,r)=n!/(r!*(n-r)!) C(n,r)=C(n-1,r)+C(n-1,r-1)
3、错排公式 d[1]=0; d[2]=1;...
分类:
其他好文 时间:
2014-10-28 13:54:37
阅读次数:
210
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 the head of the list.
题目描述:
输入一个数组表示的...
分类:
其他好文 时间:
2014-10-28 13:53:27
阅读次数:
157