0.57s,
import itertools
import time
def conquer():
ans = 0
DIGIT_LIMIT = 7
ITER_STR = "0123456789"
sum_square = lambda ss: sum( int( s ) ** 2 for s in str( ss ) )
fact = lambda n...
分类:
其他好文 时间:
2014-12-12 22:15:46
阅读次数:
247
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-12-12 15:01:52
阅读次数:
137
Open the Lock
Description
Now an emergent task for you is to open a password lock. The password is consisted of four digits. Each digit is numbered from 1 to 9.
Each time, you can add or m...
分类:
其他好文 时间:
2014-12-11 20:54:48
阅读次数:
446
Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephon...
分类:
其他好文 时间:
2014-12-11 00:12:47
阅读次数:
297
习题2-1 位数输入一个不超过109的正整数,输出它的位数。例如12735的位数是5。请不要使用任何数学函数,只用四则运算和循环语句实现。#includeint main(void){ int n; int digit = 0; scanf("%d",&n); whi...
分类:
编程语言 时间:
2014-12-10 22:45:12
阅读次数:
321
Letter Combinations of a Phone NumberGiven a digit string, return all possible letter combinations that the number could represent.A mapping of digit ...
分类:
其他好文 时间:
2014-12-09 21:24:40
阅读次数:
169
问题描述:
Given a digit string, return all possible letter combinations that the number could represent.
A mapping of digit to letters (just like on the telephone buttons) is given below.
Input:Dig...
分类:
其他好文 时间:
2014-12-08 23:03:54
阅读次数:
243
元字符:.:匹配任意单个字符[]:匹配指定范围内的任意单个字符[^]: [:digit:]数字 [:lower:] 小写字母 [:upper:]大写字母 [:punct:]标点符号,[:space;]空白字符 [:alpha:]所有字母 [:alnum;]所有数字和字母\或\b: 锚定词尾,其前面的...
分类:
其他好文 时间:
2014-12-07 22:55:18
阅读次数:
283
Letter Combinations of a Phone NumberGiven a digit string, return all possible letter combinations that the number could represent.A mapping of digit ...
分类:
其他好文 时间:
2014-12-03 21:12:18
阅读次数:
188
Given a non-negative number represented as an array of digits, plus N to the number.The digits are stored such that the most significant digit is at t...
分类:
其他好文 时间:
2014-11-29 07:05:00
阅读次数:
185