码迷,mamicode.com
首页 >  
搜索关键字:digits    ( 2164个结果
ZOJ 3793 First Digit
rt,直接猜1 First Digit Time Limit: 2 Seconds      Memory Limit: 65536 KB      Special Judge Benford's Law, also called the First-Digit Law, refers to the frequency distribution of digits i...
分类:其他好文   时间:2014-06-20 13:04:39    阅读次数:277
projecteuler---->problem=20----Factorial digit sum
n! means n (n 1) ... 3 2 1 For example, 10! = 10 9 ... 3 2 1 = 3628800, and the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27. Find the sum of the digits...
分类:其他好文   时间:2014-06-20 09:34:10    阅读次数:215
[leetcode]Plus One @ Python
原题地址:https://oj.leetcode.com/problems/plus-one/题意:Given a non-negative number represented as an array of digits, plus one to the number.The digits are...
分类:编程语言   时间:2014-06-11 11:25:27    阅读次数:304
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...
分类:其他好文   时间:2014-06-11 00:35:15    阅读次数:243
leetcode——Add Two Numbers 两个链表表示的正整数对其求和(AC)
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 link...
分类:其他好文   时间:2014-06-08 15:30:28    阅读次数:227
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 ...
分类:其他好文   时间:2014-06-08 15:30:08    阅读次数:182
[LeetCode] Reverse Integer [8]
题目 Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321。 解题思路: 颠倒一个整数中数字的位置,哈哈,类似翻转字符串一样,只不过整数需要计算,需要考虑溢出,其他无而。写出代码不难,只是溢出的时候怎么办,我这里是按照返回-1处理的,在leetcode上可以AC。 代码实现:...
分类:其他好文   时间:2014-06-08 14:47:58    阅读次数:257
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.255.11.135", "255.255.111.3...
分类:其他好文   时间:2014-06-08 10:37:47    阅读次数:273
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-06-07 16:56:28    阅读次数:188
leetcode--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-06-06 12:38:42    阅读次数:255
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!