Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321click to show spoilers.Have you thought about this?Here are som...
分类:
其他好文 时间:
2014-08-19 23:54:05
阅读次数:
245
题目:Given an integer N, and how many pairs (A;B) are there such that: gcd(A;B) = A xor B where 1=2)是不同位数的。和同学讨论后得出如下证明:设最大公约数为 j, 假设这两个数是b 和 b+k*j,(k>....
分类:
其他好文 时间:
2014-08-19 23:50:55
阅读次数:
233
Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (i...
分类:
其他好文 时间:
2014-08-19 23:42:35
阅读次数:
227
package?com.victor.sort.seeds;
import?java.util.ArrayList;
/**
?*?倒序
?*?@author?黑妹妹牙膏
?*
?*/
public?class?Reversed?extends?Seeds?{
@Override
protected?ArrayList<Integer>?...
分类:
其他好文 时间:
2014-08-19 19:19:35
阅读次数:
190
An array A[1...n] contains all the integers from 0 to n except for one number which is missing.In this problem, we cannot access an entire integer in ...
分类:
其他好文 时间:
2014-08-19 18:49:45
阅读次数:
251
Mayor's postersTime Limit: 3000msMemory Limit: 131072KBThis problem will be judged onUVA. Original ID:1058764-bit integer IO format:%lld Java class na...
分类:
其他好文 时间:
2014-08-19 18:10:15
阅读次数:
400
SET QUOTED_IDENTIFIER ON GOSET ANSI_NULLS ON GOALTER procedure GetVIPMark(@SLDAT datetime, @PNO integer, @SNO integer, @VIPNO varchar(20), @PLUInfo...
分类:
其他好文 时间:
2014-08-19 12:25:34
阅读次数:
228
LCM (Least Common Multiple) of a set of integers is defined as the minimum number, which is a multiple of all integers of that set. It is interesting to note that any positive integer can be expressed...
分类:
其他好文 时间:
2014-08-18 23:38:13
阅读次数:
275
Digital RootsTime Limit: 1000ms Memory limit: 65536K有疑问?点这里^_^题目描述The digital root of a positive integer is found by summing the digits of the integer...
分类:
其他好文 时间:
2014-08-18 22:00:43
阅读次数:
228
1-2+3-4+......+m=(1-2)+(3-4)+...+[(m-2)-(m-1)]+m=-1+(-1)+(-1)+...+(-1)+m,一共有(m-1)/2个-1相加,再加上m,所以上式等于:(-1)*(m-1)/2+m代码:function sum(m as integer)sum=(-...
分类:
其他好文 时间:
2014-08-18 22:00:12
阅读次数:
232