码迷,mamicode.com
首页 >  
搜索关键字:digits    ( 2164个结果
[Leetcode][JAVA] Sum Root to Leaf Numbers
Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3which rep...
分类:编程语言   时间:2014-10-27 08:10:18    阅读次数:196
leetcode - Decode Ways
A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given an encoded message containing digits, determine the total numb...
分类:其他好文   时间:2014-10-26 17:04:00    阅读次数:194
[Leetcode] Plus One
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...
分类:其他好文   时间:2014-10-26 16:58:18    阅读次数:134
【LeetCode】Add Two Numbers 解题报告
【题目】 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 and return it...
分类:其他好文   时间:2014-10-26 14:21:29    阅读次数:243
LeetCose-Plus One
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...
分类:其他好文   时间:2014-10-26 11:35:14    阅读次数:142
[Leetcode] Plus One
题目: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...
分类:其他好文   时间:2014-10-25 22:56:10    阅读次数:164
UVA - 10061 How many zero's and how many digits ?
n!=x*b^y, 当x为正整数时,最大的y就是n!末尾0的个数了, 把n,b分别拆成素因子相乘的形式: 例如, n=5,b=16 n=5,b=2^4, 很明显,末尾0的个数为0 10进制时,n!=a*10^x b进制时,n!=c*b^y 很明显,n!的位数就是最大的x+1 这里计算我用了log,精度设置为1e-9 #include...
分类:其他好文   时间:2014-10-24 20:47:09    阅读次数:320
LeetCode:Reverse Integer
题目描述: Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 思路:先判断给的数是正数还是负数还是零。如果是零,则直接返回。如果是正数,则通过%和/运算求得给定数字的各位,再重新组合得到要求得数字。如果为负数则先转换为正数,再按正数处理,最后返回...
分类:其他好文   时间:2014-10-24 16:42:21    阅读次数:112
Add Two Numbers
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 ...
分类:其他好文   时间:2014-10-23 22:15:45    阅读次数:130
HDU-4249-A Famous Equation(DP)
Problem Description Mr. B writes an addition equation such as 123+321=444 on the blackboard after class. Mr. G removes some of the digits and makes it look like “1?3+??1=44?”. Here “?” denotes remo...
分类:其他好文   时间:2014-10-22 01:05:25    阅读次数:213
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!