码迷,mamicode.com
首页 >  
搜索关键字:digits    ( 2164个结果
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-05-16 23:18:16    阅读次数:360
LeetCode-004 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 as a linked list. Input: (2 -> 4 -> 3) + (5 -> 6 -> 4) Out...
分类:其他好文   时间:2014-05-15 05:13:49    阅读次数:306
【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 the head of the list. 解答 本题考察进位问题,注...
分类:其他好文   时间:2014-05-15 04:16:56    阅读次数:245
LeetCode 007 Reverse Integer
【题目】 Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 【题意】 反转int型整数,输出的也是int型的整数 【思路】 如要考虑两种特殊情况: 1. 类似100这样的整数翻转之后为1 2. 翻转之后的值溢出该如何处理, 本题的测试用例中似乎没有给出溢出的情况 ...
分类:其他好文   时间:2014-05-14 20:41:19    阅读次数:244
Leetcode 数 Reverse Integer
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie Reverse Integer  Total Accepted: 17472 Total Submissions: 43938 Reverse digits of an integer. Example1: x = 123, return 32...
分类:其他好文   时间:2014-05-14 00:59:13    阅读次数:369
python批量修改服务器密码,同时保存execl表格
#!/usr/bin/envpython#coding:utf8#随机生成自定义长度密码fromrandomimportchoiceimportstring,pickledefGenPassword(length=8,chars=string.ascii_letters+string.digits):return‘‘.join([choice(chars)foriinrange(length)])defpasslist(r_user,c_user,ip_list,web_list):di..
分类:编程语言   时间:2014-05-13 01:25:56    阅读次数:505
LeetCode --- Plus One
题目链接题意:给出一个以数组形式表示的数, 求该数加1后的结果,同样以数组形式返回。附上代码: 1 class Solution { 2 public: 3 vector plusOne(vector &digits) { 4 unsigned int len = digit...
分类:其他好文   时间:2014-05-12 12:49:34    阅读次数:268
[leetcode]Sum Root to Leaf Numbers @ Python
原题地址:http://oj.leetcode.com/problems/sum-root-to-leaf-numbers/题意:Given a binary tree containing digits from0-9only, each root-to-leaf path could repre...
分类:编程语言   时间:2014-05-12 01:28:30    阅读次数:440
LeetCode OJ - Restore IP Addresses
这道题采用穷举法。 1 /** 2 * Given a string containing only digits, 3 * restore it by returning all possible valid IP address combinations. 4 ...
分类:其他好文   时间:2014-05-08 09:17:22    阅读次数:248
Pat(Advanced Level)Practice--1060(Are They Equal)
Pat1060代码 题目描述: 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 simple chopping. Now given...
分类:其他好文   时间:2014-05-08 02:07:49    阅读次数:452
2164条   上一页 1 ... 213 214 215 216 217 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!