码迷,mamicode.com
首页 >  
搜索关键字:digits    ( 2164个结果
Stepping Number
ProblemA number is called as a stepping number if the adjacent digits are having a difference of 1. For eg. 8,343,545 are stepping numbers. While 890,...
分类:其他好文   时间:2014-11-21 10:20:13    阅读次数:238
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-11-20 15:06:39    阅读次数:212
Codeforces Round #179 (Div. 2) B. Yaroslav and Two Strings (容斥原理)
题目链接DescriptionYaroslav thinks that two stringssandw, consisting of digits and having lengthnare non-comparable if there are two numbers,iandj(1?≤?i,?...
分类:其他好文   时间:2014-11-19 22:06:35    阅读次数:228
codeforces 489C.Given Length and Sum of Digits... 解题报告
题目链接:http://codeforces.com/problemset/problem/489/C题目意思:给出 m 和 s,需要构造最大和最小的数。满足长度都为 m,每一位的数字之和等于 s。如果构造不出来,输出 -1 -1。否则输出最小和最大且符合条件的数。 想了两个多小时,发现想错了方向....
分类:其他好文   时间:2014-11-19 18:13:28    阅读次数:157
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. 思路:先将list...
分类:其他好文   时间:2014-11-19 11:04:49    阅读次数:175
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 ...
分类:其他好文   时间:2014-11-18 23:34:43    阅读次数:237
[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-11-17 19:29:21    阅读次数:213
Digital Roots
描述The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is th...
分类:其他好文   时间:2014-11-16 17:16:56    阅读次数:270
[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 ...
分类:其他好文   时间:2014-11-16 15:52:15    阅读次数:226
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-11-16 14:36:42    阅读次数:140
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!