码迷,mamicode.com
首页 >  
搜索关键字:integer    ( 14932个结果)
判断一个数字是否为回文数
Determine whether an integer is a palindrome. Do this without extra space.(source)判断一个数字是否为回文数,并且不使用额外的存储空间。“回文”是指正读反读都能读通的句子,那么回文数,就很容易理解,就是指一个数正反读的值是相同的。还有一个要求是不要使用额外的存储空间。Hints: 要将一个数的最高位与最低位比较,取出一...
分类:其他好文   时间:2015-03-16 17:45:42    阅读次数:142
Why celsius = 5 * (fahr - 32) / 9 ?
There is a program to print Fahrenheit-Celsius table as below. #include /* print Fahrenheit-Celsius table for fahr = 0, 20, ..., 300 */ int main() { int fahr, celsius; int lower, upper, st...
分类:其他好文   时间:2015-03-16 16:31:34    阅读次数:184
190. Reverse Bits Leetcode Python
Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as 001110010...
分类:编程语言   时间:2015-03-16 14:40:54    阅读次数:156
191. Number of 1 Bits Leetcode Python
Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight). For example, the 32-bit integer ’11' has binary representation 00000000...
分类:编程语言   时间:2015-03-16 12:57:41    阅读次数:180
Lintcode: Merge Sorted Array
Merge two given sorted integer array A and B into a new sorted integer array.ExampleA=[1,2,3,4]B=[2,4,5,6]return [1,2,2,3,4,4,5,6]ChallengeHow can you...
分类:其他好文   时间:2015-03-16 06:11:42    阅读次数:212
leedcode 191 Hamming Weight
191.For example, the 32-bit integer ’11' has binary representation00000000000000000000000000001011, so the function should return 3.Java codeint hammi...
分类:其他好文   时间:2015-03-15 22:52:06    阅读次数:123
Hibernate配置对象关联关系
//实体类public class Tbs implements java.io.Serializable {// Fields private Integer id; private Zbs zbs; private String tbqy; private String content; pri...
分类:Web程序   时间:2015-03-15 22:51:42    阅读次数:130
BNU44583——Star Trek: First Contact——————【01背包】
H. Star Trek: First ContactTime Limit: 1000msMemory Limit: 65536KB64-bit integer IO format:%lld Java class name:MainSubmitStatusPID: 44583星舰进取号(NCC-17...
分类:其他好文   时间:2015-03-15 22:44:12    阅读次数:206
LeetCode Number of 1 Bits
1.题目Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight).For example, the 32-bit integer ’11' has binary representation 00000000...
分类:其他好文   时间:2015-03-15 19:53:10    阅读次数:92
JDBC学习笔记(2):创建数据库连接
1.建立数据库 1 --创建数据库 2 create database jdbc; 3 --调用数据库 4 use jdbc; 5 --创建user表 6 create table user 7 ( 8 id integer not n...
分类:数据库   时间:2015-03-15 19:40:00    阅读次数:175
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!