码迷,mamicode.com
首页 >  
搜索关键字:digits    ( 2164个结果
Codewars Solution:Convert number to reversed array of digits
Level 8kyu :Convert number to reversed array of digits 将数字转换为反转的数字数组 给定一个随机的非负数,您必须以相反的顺序返回该数字在数组中的数字。 例:348597 => [7,9,5,8,4,3] 主要方法: ArrayListy: get ...
分类:其他好文   时间:2020-05-24 00:51:47    阅读次数:56
[LeetCode] 282. Expression Add Operators
Given a string that contains only digits 0-9 and a target value, return all possibilities to add binary operators (not unary) +, -, or * between the d ...
分类:其他好文   时间:2020-05-21 09:38:29    阅读次数:44
Codeforces Round #643 (Div. 2)
题目传送门 A. Sequence with Digits an+1=an+minDigit(an)?maxDigit(an),已知a1,k,求ak。 当minDigit(an)=0时,an+1=an,对后续的答案不会产生影响了。 #include <bits/stdc++.h> using nam ...
分类:其他好文   时间:2020-05-18 23:02:42    阅读次数:81
python-os&sys&time模块&mysql模块
1、string常量 1 # 0123456789 2 print(string.digits) 3 # abcdefghijklmnopqrstuvwxyz 4 print(string.ascii_lowercase) 5 # ABCDEFGHIJKLMNOPQRSTUVWXYZ 6 print ...
分类:数据库   时间:2020-05-18 00:42:54    阅读次数:72
Codeforces Round #643 (Div. 2) 题解 (ABCD)(佛系更新中)
[TOC] https://codeforces.com/contest/1355 打一半和室友开黑去了哈哈哈哈哈哈反正不计分(不要学我) A. Sequence with Digits 这题我会证!首先对于百位来说,不可能从x跳到x+2,只能从x变成x+1或者不变(因为最大变化量为 $9\time ...
分类:其他好文   时间:2020-05-17 00:59:41    阅读次数:90
【每日一题】- Leetcode 402. Remove K Digits
Description: Given a non-negative integer num represented as a string, remove k digits from the number so that the new number is the smallest possible ...
分类:其他好文   时间:2020-05-15 00:34:42    阅读次数:86
CF585F Digits of Number Pi
题意: "codeforces链接" 给定长度为 $n$ 的数字串 $s$ 和长度为 $d$ 的不含前导零的数字串 $x,y(x \le y)$。 求 存在长度至少为 $\left\lfloor\frac{d}{2}\right\rfloor$ 的子串是 $s$ 的子串 的数字串 $t \in [x ...
分类:其他好文   时间:2020-05-14 12:46:24    阅读次数:58
【字符串】556. 下一个更大元素 III
题目: 解答: 1 class Solution { 2 public: 3 vector<int> digits(int n) 4 { 5 vector<int> res; 6 while (n > 0) 7 { 8 res.push_back(n % 10); 9 n /= 10; 10 } 1 ...
分类:其他好文   时间:2020-05-04 13:39:01    阅读次数:64
leetcode 每日一题 17. 电话号码的字母组合
回溯法 思路: 通过回溯的思维,递归调用枚举出所有可能。 class Solution: def letterCombinations(self, digits): phone = {'2': ['a', 'b', 'c'], '3': ['d', 'e', 'f'], '4': ['g', 'h' ...
分类:其他好文   时间:2020-04-29 12:57:46    阅读次数:64
PTA(Advanced Level)1060.Are They Equal
If a machine can save only 3 significant digits, the float numbers 12300 and 12358.9 are considered equal since they are both saved as 0.123×105 with ...
分类:其他好文   时间:2020-04-27 11:23:14    阅读次数:43
2164条   上一页 1 ... 6 7 8 9 10 ... 217 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!