码迷,mamicode.com
首页 >  
搜索关键字:digits    ( 2164个结果
The Digits String
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
17. Letter Combinations of a Phone Number
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
LeetCode(Add Two Numbers)
一、题目要求 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
LC 869. Reordered Power of 2
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
Leetcode 753. Cracking the Safe
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
PAT 甲级 1005 Spell It Right (20 分)
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
常用模块(string)
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
321. Create Maximum Number (c++ ——> lexicographical_compare)
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
【leetcode】967. Numbers With Same Consecutive Differences
题目如下: 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
CF352A Jeff and Digits
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
2164条   上一页 1 ... 31 32 33 34 35 ... 217 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!