str1=‘abced‘
foriinrange(-1,-len(str1),-1)+[None]:
printstr1[:i]
s,t=‘abc‘,‘def‘
printzip(s,t)
fori,tinenumerate(str1):
printi,t
printisinstance(‘foo‘,str)
importstring
defcheckid():
alphas=string.letters+‘_‘
nums=string.digits
check=raw_input(‘inputid..
分类:
编程语言 时间:
2016-06-23 19:04:11
阅读次数:
391
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 ...
分类:
其他好文 时间:
2016-06-22 15:26:36
阅读次数:
105
Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n.Example:
Given n = 2, return 91. (The answer should be the total numbers in the range of 0 ≤ x < 100, excludi...
分类:
其他好文 时间:
2016-06-21 07:12:43
阅读次数:
111
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 ...
分类:
其他好文 时间:
2016-06-20 15:31:56
阅读次数:
119
Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n. Given a non-negative integer n, count all numbers with uni ...
分类:
其他好文 时间:
2016-06-20 12:49:05
阅读次数:
115
Additive number is a string whose digits can form additive sequence. Additive number is a string whose digits can form additive sequence. A valid addi ...
分类:
其他好文 时间:
2016-06-19 06:47:40
阅读次数:
188
1. 问题描述 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 i ...
分类:
其他好文 时间:
2016-06-18 19:50:27
阅读次数:
133
Given two arrays of length m and n with digits 0-9 representing two numbers. Create the maximum number of length k <= m + n from digits of the two. Th ...
分类:
其他好文 时间:
2016-06-17 00:31:43
阅读次数:
218
一天一道LeetCode
本系列文章已全部上传至我的github,地址:ZeeCoder‘s Github
欢迎大家关注我的新浪微博,我的新浪微博
欢迎转载,转载请注明出处
(一)题目
Given a string containing only digits, restore it by returning all possible valid IP address combi...
分类:
其他好文 时间:
2016-06-16 14:52:05
阅读次数:
102
1. 问题描述 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 di ...
分类:
其他好文 时间:
2016-06-15 23:36:02
阅读次数:
121