码迷,mamicode.com
首页 >  
搜索关键字:digits    ( 2164个结果
Leetcode 7. Reverse Integer(水)
7. Reverse Integer Easy Easy Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input: -123 Out ...
分类:其他好文   时间:2019-08-27 23:18:48    阅读次数:96
(Easy) Add to Array-Form of Integer (LeetCode)
Description: For a non-negative integer X, the array-form of X is an array of its digits in left to right order. For example, if X = 1231, then the ar ...
分类:其他好文   时间:2019-08-27 17:35:04    阅读次数:107
【hdu4734】F(x)-数位DP
题目描述: For a decimal number x with n digits (AnAn-1An-2 ... A2A1), we define its weight as F(x) = An * 2n-1 + An-1 * 2n-2 + ... + A2 * 2 + A1 * 1. Now ...
分类:其他好文   时间:2019-08-27 12:20:14    阅读次数:76
66.加一
class Solution: def plusOne(self, digits: List[int]) -> List[int]: for i in reversed(range(len(digits))): if digits[i] == 9: digits[i] = 0 else: digit... ...
分类:其他好文   时间:2019-08-26 22:55:54    阅读次数:80
PAT A1001 A+B Format
PAT A1001 A+B Format 题目描述: Calculate a+b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas ...
分类:其他好文   时间:2019-08-26 15:13:36    阅读次数:80
PAT A1005 Spell It Right
PAT A1005 Spell It Right 题目描述: 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 s ...
分类:其他好文   时间:2019-08-26 14:55:14    阅读次数:59
Educational Codeforces Round 59 (Rated for Div. 2)(ABCD)
A. Digits Sequence Dividing 题意:给你一个数字串,只包含1-9,让你至少分成两段,使得每一段的数字大于前一段的数字; 解:对n特判,如果n为2,那么比较一下两个数字大小,如果n>2,那么就可以直接分成两部分,第一部分1个数字,剩下都为第二部分; #include <bit ...
分类:其他好文   时间:2019-08-24 22:52:29    阅读次数:112
C#中的Byte,String,Int,Hex之间的转换函数。
/// <summary> Convert a string of hex digits (ex: E4 CA B2) to a byte array. </summary> /// <param name="s"> The string containing the hex digits (wit ...
分类:Windows程序   时间:2019-08-24 18:22:35    阅读次数:146
CodeForces - 260B
A recently found Ancient Prophesy is believed to contain the exact Apocalypse date. The prophesy is a string that only consists of digits and characte ...
分类:其他好文   时间:2019-08-21 09:51:41    阅读次数:75
2018-2019, ICPC, Asia Yokohama Regional Contest 2018 (Gym - 102082)
2018 2019, ICPC, Asia Yokohama Regional Contest 2018 "A Digits Are Not Just Characters" 签到。 "B Arithmetic Progressions" 题意:从给定的集合中选出最多的数构成等差数列。 题解:数字排 ...
分类:其他好文   时间:2019-08-19 20:43:50    阅读次数:305
2164条   上一页 1 ... 19 20 21 22 23 ... 217 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!