码迷,mamicode.com
首页 >  
搜索关键字:digits    ( 2164个结果
【02_258】Add Digits
Add DigitsTotal Accepted:49702Total Submissions:104483Difficulty:EasyGiven a non-negative integernum, repeatedly add all its digits until the result h...
分类:其他好文   时间:2015-12-11 09:54:06    阅读次数:182
Plus One
class Solution {public: vector plusOne(vector& digits) { int val= 1; int length = digits.size();//注意数字的高位为digits[0],低位在digits[length-1] for(int i = le...
分类:其他好文   时间:2015-12-10 16:55:48    阅读次数:111
LeetCode Reverse Integer
Reverse Integer Total Accepted: 61132 Total Submissions: 219035 My Submissions Question Solution Reverse digits of an integer.Example1: x = 1...
分类:其他好文   时间:2015-12-10 13:19:05    阅读次数:154
Reverse Integer
Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321翻译就是把一个数字反过来输出。解题思路:这道题目看起来比较简单。无非就是一个数字取个位,作为另一个高位。无非是在10的运算。初...
分类:其他好文   时间:2015-12-08 20:05:04    阅读次数:137
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 sing...
分类:其他好文   时间:2015-12-08 14:21:34    阅读次数:102
[string]Restore IP Addresses
Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given"25525511135",return["255.2...
分类:其他好文   时间:2015-12-06 22:38:44    阅读次数:171
1069. The Black Hole of Numbers (20)
For any 4-digit integer except the ones with all the digits being the same, if we sort the digits in non-increasing order first, and then in non-decre...
分类:其他好文   时间:2015-12-06 13:03:49    阅读次数:142
1060. Are They Equal (25)
If a machine can save only 3 significant digits, the float numbers 12300 and 12358.9 are considered equal since they are both saved as 0.123*105 with ...
分类:其他好文   时间:2015-12-06 12:57:30    阅读次数:223
LeetCode - Add Digits
题目:Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.For example:Given num = 38, the process is like...
分类:其他好文   时间:2015-12-06 11:20:11    阅读次数:103
1001. A+B Format
时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueCalculate a + b and output the sum in standard format -- that is, the digits must be separat...
分类:其他好文   时间:2015-12-06 10:01:16    阅读次数:191
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!