https://ac.nowcoder.com/acm/contest/338/L 题解: 当n==1时,0-9填上的话,对4取余,分别是余数为0的3个,1的3个,2的2个,3的2个; 当n==2时,因为一个数的时候有3323的余数个数分布,如果第2个填上数可以使原来的余数变成0或者保持零,那么可以 ...
分类:
其他好文 时间:
2019-01-16 19:13:14
阅读次数:
198
public class Solution { public List letterCombinations(String digits) { LinkedList ans = new LinkedList(); if(digits.length() == 0) return ans; String ...
分类:
其他好文 时间:
2019-01-14 10:48:53
阅读次数:
157
一、题目要求 You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes ...
分类:
其他好文 时间:
2019-01-13 23:32:15
阅读次数:
324
Starting with a positive integer N, we reorder the digits in any order (including the original order) such that the leading digit is not zero. Return ...
分类:
其他好文 时间:
2019-01-13 14:19:23
阅读次数:
178
Problem: There is a box protected by a password. The password is n digits, where each letter can be one of the first k digits 0, 1, ..., k-1. You can ...
分类:
其他好文 时间:
2019-01-13 12:25:35
阅读次数:
311
Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English. Input Specificat ...
分类:
其他好文 时间:
2019-01-06 11:53:55
阅读次数:
193
import string# dt = string.digits # 获取0-9的数字# dt = string.ascii_letters # 获取所有的大小写字母# dt = string.hexdigits # 获取十六进制# dt = string.ascii_letters # 获取小写 ...
分类:
其他好文 时间:
2019-01-05 19:43:24
阅读次数:
172
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 ...
分类:
编程语言 时间:
2018-12-31 21:59:17
阅读次数:
123
题目如下: Return all non-negative integers of length N such that the absolute difference between every two consecutive digits is K. Note that every number ...
分类:
其他好文 时间:
2018-12-31 11:54:37
阅读次数:
213
Jeff's got n cards, each card contains either digit 0, or digit 5. Jeff can choose several cards and put them in a line so that he gets some number. W ...
分类:
其他好文 时间:
2018-12-30 20:38:47
阅读次数:
174