码迷,mamicode.com
首页 >  
搜索关键字:number    ( 26994个结果
[leetcode]Single Number II
Given an array of integers, every element appears three times except for one. Find that single one.Note: Your algorithm should have a linear runtime complexity. Could you implement it without using ex...
分类:其他好文   时间:2015-04-05 14:42:18    阅读次数:138
LeetCode7~9 Reverse Integer/String to Integer (atoi)/Palindrome Number
一:Reverse Integer 题目: Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 链接:https://leetcode.com/problems/reverse-integer/ 分析:这题通过不断取余将余数存放在一个vecto...
分类:其他好文   时间:2015-04-05 14:40:31    阅读次数:161
ORACLE里的自增字段设置
大家都知道吧,这很坑,尤其是用惯了mysql里的自增字段设置,结果oracle里面没有的。oh,no我用的是12c版本的,它有一个新特性,可以这样设置自增序列,在创建表是,把id设置为自增序列create table t( id number genera...
分类:数据库   时间:2015-04-05 14:31:05    阅读次数:142
[LeetCode]Largest Number, 解题报告
目录目录 题目 思路 AC代码题目 Given a list of non negative integers, arrange them such that they form the largest number. For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330. Not...
分类:其他好文   时间:2015-04-05 13:22:34    阅读次数:140
杭电 HDU ACM 1391 Number Steps
Number Steps Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 4376    Accepted Submission(s): 2656 Problem Description Starting from poi...
分类:其他好文   时间:2015-04-05 09:15:06    阅读次数:130
杭电 HDU ACM 1395 2^x mod n = 1
2^x mod n = 1 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 13610    Accepted Submission(s): 4208 Problem Description Give a number n...
分类:其他好文   时间:2015-04-05 09:06:40    阅读次数:104
csu 1392 Number Trick (数论)
题意:输入一个数x 从小到大输出所有满足 (k*leny+y)*x=y*10+k 的k*leny+y思路:因为x 为浮点数 所以等式两边都要乘 1e4 将等式化为 k(leny*x-1)*1e4=y(1e5-x*1e4) 可以通过枚举 len k 来求出y是否存在 存在时位数又是否符合条...
分类:其他好文   时间:2015-04-05 06:37:21    阅读次数:152
js类型转换的坑
JS的灵活 说好听是说JS灵活, 说不好听就是JS的坑太多, JS类型转换就是一个大坑, JS的类型包括了原始类型的[null, undefined, String ,Number, Boolean],以及对象类型的[function, object];null, undefined, "",...
分类:Web程序   时间:2015-04-05 01:07:33    阅读次数:201
重拾ZOJ 一周解题
ZOJ 2734 Exchange Cards题目大意:给定一个值N,以及一堆卡片,每种卡片有一个值value和数量number。求使用任意张卡片组成N的方式。例如N = 10 ,cards(10,2)(7,2)(5,3)(2,2)(1,5),则10 = 10,10 =7+3+1,10=5+5…思路...
分类:其他好文   时间:2015-04-04 23:46:49    阅读次数:262
【leetcode】Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:其他好文   时间:2015-04-04 22:22:21    阅读次数:229
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!