码迷,mamicode.com
首页 >  
搜索关键字:digits    ( 2164个结果
1069 The Black Hole of Numbers
For any 4-digit integer except the ones with all the digits being the same, if we sort the digits in non-increasing order first, and then in non-decre ...
分类:其他好文   时间:2019-08-17 18:00:35    阅读次数:1440
string 类
import string string.punctuation 会返回所有常用的标点符号 string.ascii_letters 会返回 a-zA-Z string.ascii_lowercase 小写a-z string.ascii_uppercase 大写A-Z string.digits ...
分类:其他好文   时间:2019-08-13 15:05:58    阅读次数:98
[栈] leetcode 402 Remove K Digits
problem:https://leetcode.com/problems/remove-k-digits 单调栈。维护一个递增的栈,每pop一次意味着移除了一个元素,k--。减为0时不再移除。前导0处理起来很麻烦,很容易WA。 ...
分类:其他好文   时间:2019-08-10 17:46:13    阅读次数:83
LeetCode 66. 加一(java)
题目: https://leetcode-cn.com/problems/plus-one/ 如果digits数组最后一位小于9,则只需要将digits数组最后一个数+1,返回digits数组即可;如果最后一位等于9,则需要设置一个循环进行加法模拟,即对每一位进行判断,小于10退出循环,如果等于10 ...
分类:编程语言   时间:2019-08-09 13:41:45    阅读次数:77
[Daily Coding Problem 250] Cryptarithmetic Puzzle
A cryptarithmetic puzzle is a mathematical game where the digits of some numbers are represented by letters. Each letter represents a unique digit. Fo ...
分类:其他好文   时间:2019-08-06 11:01:04    阅读次数:98
C#中如何在字符串中设置上标
请参考以下网址中的表格:https://en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts The most common superscript digits (1, 2, and 3) were in ISO-8859-1 and ...
分类:Windows程序   时间:2019-08-05 14:06:25    阅读次数:220
Check if a large number is divisible by 3 or not
1 //检验一个大数是否能3整除 2 //A number is divisible by 3 if sum of its digits is divisible by 3. 3 //we cannot use n % 3 to check if a number is divisible by 3... ...
分类:其他好文   时间:2019-08-03 21:58:36    阅读次数:130
Codeforces Edu Round 59 A-D
A. Digits Sequence Dividing 注意特殊情况,在$n = 2$时除非$str[1] = str[2]$,否则可以把第一个数划分下来,剩下的数直接当成一组,一定满足条件。 C. Brutality 用堆维护连续子段最大和即可。 D. Compression 实质上是把这图压缩到 ...
分类:其他好文   时间:2019-08-03 00:15:44    阅读次数:86
66. Plus One
66. Plus One 1. 题目 Given a non empty array of digits representing a non negative integer, plus one to the integer. The digits are stored such that the ...
分类:其他好文   时间:2019-08-02 09:13:09    阅读次数:86
C. Given Length and Sum of Digits...
http://codeforces.com/contest/489/problem/C 大数就是从最高位,能大就大;小数就是从最低位,能小就小,再处理下最高位为0的情况。 无结果无非一个sum太小,min全为0,一个sum太大,全为9还有剩 ...
分类:其他好文   时间:2019-07-27 23:55:02    阅读次数:185
2164条   上一页 1 ... 20 21 22 23 24 ... 217 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!