MedianTime Limit: 5 Seconds Memory Limit: 65536 KBThe median of m numbers is after sorting them in order, the middle one number of them if m is even o...
分类:
其他好文 时间:
2014-09-04 16:49:29
阅读次数:
190
PalindromesA regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA" is a pali....
分类:
其他好文 时间:
2014-09-04 00:01:57
阅读次数:
310
Two SumGiven an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the...
分类:
其他好文 时间:
2014-09-03 22:31:37
阅读次数:
386
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possibl...
分类:
其他好文 时间:
2014-09-03 22:28:37
阅读次数:
250
Description
Consider two natural numbers A and B. Let S be the sum of all natural divisors of A^B. Determine S modulo 9901 (the rest of the division of S by 9901).
Input
The only line contains the ...
分类:
其他好文 时间:
2014-09-03 16:50:26
阅读次数:
271
1、问题
There are two int variables: a and b, don't use "if"、"? :"、"switch" or other judgement statement, find out the biggest one of the two numbers.
(有两个变量a和b,不用“if”、“? :”、“switch”或其他判断语句,找出两个数中比较大...
分类:
其他好文 时间:
2014-09-03 11:20:16
阅读次数:
178
/*
Write a program that prints the numbers from 1 to 100,but for multiples of three print “Fizz” instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of...
分类:
其他好文 时间:
2014-09-03 11:19:16
阅读次数:
221
问题描述
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add
the two numbers...
分类:
其他好文 时间:
2014-09-02 19:57:55
阅读次数:
166