E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
(digits)
Python: round函数
基本语法如下:round(number,n
digits
)其中:number是你要四舍五入的浮点数。n
digits
(可选)决定了四舍五入到哪个位置,0是到整数位,负数是到十位、百位等。
湫兮之风
·
2024-09-15 16:40
python
python
开发语言
numpy
人工智能
1132.Cut Integer
题目描述CuttinganintegermeanstocutaK
digits
loneintegerZintotwointegersof(K/2)
digits
longintegersAandB.Forexample
pickpickmeup
·
2024-09-10 05:03
合集Set
*/letodd
Digits
CN_HarrySun
·
2024-09-08 03:34
每日一题:力扣738. 单调递增的数字
题目链接:https://leetcode-cn.com/problems/monotone-increasing-
digits
/题目给定一个非负整数N,找出小于或等于N的最大的整数,同时这个整数需要满足其各个位数上的数字是单调递增
看了个寂寞
·
2024-09-04 17:53
算法
leetcode
贪心算法
738. 单调递增的数字
classSolution{public:intmonotoneIncreasing
Digits
(intN){if(Nnum;//将数字转换位数组形式do{num.push_front(N%10);N/
SYaoJun
·
2024-09-04 16:22
LeetCode经典题
贪心算法
python如何对excel批量加密_python实现linux服务器批量修改密码并生成execl
随机生成自定义长度密码fromrandomimportchoiceimportstring,pickledefGenPassword(length=8,chars=string.ascii_letters+string.
digits
weixin_39963523
·
2024-09-03 05:02
用Linux shell编的一个小计算器
shecho-n"welcometomyprogrammingworld"echo-n"Thisprogramisacalculator"operator="+-x/exit"echo"pleaseinputtwo
digits
deflag
·
2024-09-01 12:55
Linux
shell
linux
input
Leetcode 17. 电话号码的字母组合 C++实现
算法:递归嵌套,先获取
digits
长度n,如果为0则直接返回空数组。创建path数组,path数组的单个位置的长度由
digits
长度n来决定,有几个数字,组合的字母就有几个。
重生之我是数学王子
·
2024-08-28 01:08
算法
leetcode
Leetcode面试经典150题-17.电话号码的字母组合
突然发现回溯题最近考的好多,其实没啥技术含量解法都在代码里,不懂就留言或者私信classSolution{publicstaticfinalchar[][]
digits
CharArr={{},{},{'
鱼跃鹰飞
·
2024-08-27 17:13
字节跳动高频面试题
Leetcode
leetcode
面试
linux
Leetcode刷题(第17题)——电话号码的字母组合
二、示例示例一输入:
digits
="23"输出:["ad","ae","af","bd","be","bf","cd","ce","cf"]示例二输入:
digits
="
卖菜的小白
·
2024-08-27 13:50
面试算法
leetcode
算法
递归算法
LeetCode刷题笔记(Java实现)-- 17.电话号码的字母组合
示例:输入:
digits
=“23”输出:[“ad”,“ae”,“af”,“bd”,“be”,“bf”,“cd”,“ce”,“cf”]编码思路:(建议对照代码理解)1.创建最后输出的字符组合的集合combination
挽风归
·
2024-08-27 13:48
数据结构与算法之 leetcode 17. 电话号码的字母组合
17.电话号码的字母组合/***@param{string}
digits
*@return{string[]}*/varletterCombinations=function(
digits
){letmap
Three_ST
·
2024-08-26 04:43
leetcode
笔记
JavaScript
leetcode
算法
职场和发展
链表
torch.set_printoptions()
None,linewidth=None,profile=None,sci_mode=None)作用:更改print在打印tensor时的小数精度Parameters参数precision–Numberof
digits
ofprecisionforfloatingpoin
qq_39217312
·
2024-08-25 01:23
python
深度学习
pytorch
DAY 37 贪心算法06
738.单调递增的数字classSolution:defmonotoneIncreasing
Digits
(self,n:int)->int:#先将当前数字n的各位数字输入列表中,方便后续比较
digits
别问为什么拖拉机摇杆换成了刹车片
·
2024-08-22 16:03
贪心算法
算法
Java | Leetcode Java题解之第357题统计各位数字都不同的数字个数
题目:题解:classSolution{publicintcountNumbersWithUnique
Digits
(intn){if(n==0){return1;}if(n==1){return10;}
m0_57195758
·
2024-08-22 08:46
分享
Java
Leetcode
题解
Python | Leetcode Python题解之第357题统计各位数字都不同的数字个数
题目:题解:classSolution:defcountNumbersWithUnique
Digits
(self,n:int)->int:ifn==0:return1ifn==1:return10res
Mopes__
·
2024-08-22 08:42
分享
Python
Leetcode
题解
C++ | Leetcode C++题解之第357题统计各位数字都不同的数字个数
题目:题解:classSolution{public:intcountNumbersWithUnique
Digits
(intn){if(n==0){return1;}if(n==1){return10;
Ddddddd_158
·
2024-08-22 08:11
经验分享
C++
Leetcode
题解
Django——数据库
——数据库classBook(models.Model):book_name=models.CharField(max_length=20)price=models.DecimalField(max_
digits
攒了一袋星辰
·
2024-03-23 23:44
数据库
django
前端
第三 字节
位(bit,Binary
Digits
):存放一位二进制数,即0或1,为最小的存储单位,8个二进制位为一个字节单位。更大的计量单位有KB、M
smallswan
·
2024-03-10 16:15
Rust七十二变
rust
代码随想录算法训练营Day 36 || 738.单调递增的数字、968.监控二叉树
(当且仅当每个相邻位数上的数字x和y满足xint:
digits
=[int(d)fordinstr(n)]length=len(
digits
)#从右往左遍历,找到第一个不满足单调递增条件的位置foriinrange
在下小zhan
·
2024-03-06 10:04
leetcode
leetcode
代码随想录算法训练营Day37|738.单调递增的数字、968.监控二叉树
LeetCode:738.单调自增的数字C++实现classSolution{public:intmonotoneIncreasing
Digits
(intn){stringnum=to_string(n
Magical_Jason
·
2024-03-06 09:33
算法训练
算法
代码随想录算法训练营 Day 37 | 738.单调递增的数字,968.监控二叉树
738.单调递增的数字讲解链接:代码随想录-738.单调递增的数字啥也不说了,看代码就好拉publicintmonotoneIncreasing
Digits
(intn){String[]strings=
丢硬币的御坂美琴
·
2024-03-06 09:33
贪心算法
算法
leetcode
jsp EL表达式结合JSTL标准标签实现分页
(custList.rowCount/noOfRows):(custList.rowCount/noOfRows+1))}"maxFraction
Digits
="0"/>页 第4?
zp8126
·
2024-03-03 20:13
jsp
sql
c
border
jdbc
session
PTA 实验10 6-5 递归实现顺序输出整数
函数接口定义:voidprint
digits
(intn);函数print
digits
应将n的每一位数字从高位到低位顺序打印出来,每位数字占一行。
naughty0809
·
2024-02-20 20:26
PTA
c语言
代码随想录刷题打卡day36
738.单调递增的数字classSolution{public:intmonotoneIncreasing
Digits
(intn){stringnums=to_string(n);intflag=nums.size
MeloHX
·
2024-02-20 20:34
代码随想录刷题打卡记录
算法
java
数据结构
LeetCode 37天 | 738.单调递增的数字 贪心算法总结
classSolution{public:intmonotoneIncreasing
Digits
(intn){intres;//inttostring的函数to_string()可以把整数转化为字符串stringnum
星仔007
·
2024-02-20 17:56
leetcode
贪心算法
算法
习题2.3 old bill
描述Amonggrandfather’spapersabillwasfound.72turkeys$679Thefirstandthelast
digits
ofthenumberthatobviouslyrepresentedthetotalpriceofthoseturkeysarereplacedherebyblanks
513k
·
2024-02-20 07:38
王道机试指南
数据结构
【Leetcode 每日一题】402. 移掉K位数字(单调栈)
题解:classSolution:defremoveK
digits
(self,num:str,k:int)->str:stack=[]foriinrange(len(num)):whilek>0andstack
YancyKahn
·
2024-02-20 05:51
Leetcode
leetcode
栈
stack
数据结构
Day37 贪心算法part06
单调递增的数字classSolution:defmonotoneIncreasing
Digits
(self,n:int)->int:nl=[int(char)forcharinstr(n)]foriinrange
临渊羡鱼的猫
·
2024-02-20 00:37
贪心算法
算法
LeetCode 日记 Day 3
一、刷题题号2两数相加Youaregiventwonon-emptylinkedlistsrepresentingtwonon-negativeintegers.The
digits
arestoredinreverseorderandeachoftheirnodescontainasingledigit.Addthetwonumbersandreturnitasalinkedlist.Youmaya
Jhin1018
·
2024-02-14 13:23
CF1721D Maximum AND
codeforces.com/problemset/problem/1721/DFirsly,let’sconsiderfindingtheanswerbitbybit,assumingthekkknon-zero
digits
oftheanswerasx1
PYL2077
·
2024-02-13 21:44
题解
#Codeforces
c++
算法
Verilog刷题笔记30
题目:YouareprovidedwithaBCDone-digitaddernamedbcd_faddthataddstwoBCD
digits
andcarry-in,andproducesasumandcarry-out
十六追梦记
·
2024-02-13 15:37
笔记
leetcode 初级之数组篇 07
此种解法的执行效率战胜100%的Swift提交classSolution{funcplusOne(_
digits
:[Int])->[Int]{va
ngugg
·
2024-02-13 11:42
402. 移掉 K 位数字
classSolution{public:stringremoveK
digits
(stringnum,intk){dequest;for(charc:num){while(!
Python ml
·
2024-02-12 10:28
LeetCode
算法
【NICN】之计算一个数的每位之和(递归实现)
1.题目描述写一个递归函数
DigitS
um(n),输入一个非负整数,返回组成它的数字之和例如,调用
DigitS
um(1729),则应该返回1+7+2+9,它的和是19输入:1729,输出:192.解题思想思路
Nicn
·
2024-02-12 00:19
算法
leetcode
动态规划
数据结构
c语言
Reverse Integer
Givena32-bitsignedinteger,reverse
digits
ofaninteger.Example1:Input:123Output:321Example2:Input:-123Output
瞬铭
·
2024-02-11 23:31
leetcode (算法)66.加一(python版)
示例1:输入:
digits
=[1,2,3]输出:[1,2,4]解释:输入数组表示数字123。示例2:输入:
digits
=[4,3,2,1]输出:[4,3,2,2]解释:输入数组表示数字4321。
奋斗哼哼
·
2024-02-11 21:21
算法
leetcode
python
多线程创造密码本(速度超快)
importstringimporttimeimportconcurrent.futuresdefgenerate_passwords(length):#chars=string.ascii_lowercase+string.
digits
chars
木更的爱念
·
2024-02-11 11:35
python
开发语言
python 30:增加正则表达式的可读性,参数re.VERBOSE
#separator\d{3}#first3
digits
(\s|-|\.)#separator\d{4}#last4
digits
(\s*(ext|x|ext.)\
金石明镜
·
2024-02-10 21:39
Python 字符串模块
字符串模块常量print(string.ascii_letters)print(string.ascii_lowercase)print(string.ascii_uppercase)print(string.
digits
张无忌打怪兽
·
2024-02-10 18:24
Python
python
开发语言
LeetCode639. Decode Ways II——动态规划
AmessagecontaininglettersfromA-Zcanbeencodedintonumbersusingthefollowingmapping:‘A’->“1”‘B’->“2”…‘Z’->“26”Todecodeanencodedmessage,allthe
digits
mustbegroupedthenmappedbackintolettersusi
叶卡捷琳堡
·
2024-02-10 10:29
动态规划
算法
开发语言
leetcode
数据结构
Leetcode66-数组模拟整数加1
Givenanon-negativeintegerrepresentedasanon-emptyarrayof
digits
,plusonetotheinteger.Youmayassumetheintegerdonotcontainanyleadingzero
西5d
·
2024-02-09 15:04
Jeff and
Digits
Codeforces 352-A 赛后题解
天气冷了。wy学姐玩起了卡牌游戏,她遇到了一个特殊关卡。在这个关卡中,她只有数字为0或数字为5的卡牌可以打出伤害(把这些卡片上的数字排列成一排即为造成的伤害值)。Ofcourse,这个特殊的关卡有一个特殊的大BOSS,只有造成90的倍数的伤害值才有效果,否则BOSS将直接免疫伤害值。天气越来越冷了。wy学姐不想思考,于是她随机选择了幸运的你,来帮她解决这个问题——手中摸到的牌能打出的最大伤害数是多
shangwenDD
·
2024-02-09 14:49
赛后题解
c++
c语言
LeetCode91. Decode Ways——动态规划
AmessagecontaininglettersfromA-Zcanbeencodedintonumbersusingthefollowingmapping:‘A’->“1”‘B’->“2”…‘Z’->“26”Todecodeanencodedmessage,allthe
digits
mustbegroupedthenmappedbackintolettersusi
叶卡捷琳堡
·
2024-02-09 09:49
动态规划
算法
数据结构
leetcode
c++
vue 实现 手机号中间4位分格输入框(暂无选中标识
vue实现手机号中间4位分格输入框效果图获取验证码exportdefault{data(){return{
digits
:['','','','','','','','','','',''],activeIndex
weixin_42220130
·
2024-02-09 02:27
vue.js
javascript
前端
代码随想录算法训练营29期|day37 任务以及具体任务
第八章贪心算法part06738.单调递增的数字版本2classSolution{publicintmonotoneIncreasing
Digits
(intn){Strings=String.valueOf
-源潮-
·
2024-02-08 17:12
算法
java
数据结构
leetcode
代码随想录
Reverse Integer
题目Givena32-bitsignedinteger,reverse
digits
ofaninteger.答案key:用long判断是否overflowclassSolution{publicintreverse
BLUE_fdf9
·
2024-02-08 06:21
华为机考入门python3--(9)牛客9-提取不重复的整数
my_str[::-1]题目来自【牛客】defreverse_unique(n):#将输入的整数转换为字符串,这样可以从右向左遍历每一位str_n=str(n)#创建一个空列表来保存不重复的数字unique_
digits
软件工程小施同学
·
2024-02-07 21:31
华为机试机考
华为
算法
leetcode | 杨辉三角 | 电话号码配对
string_num[10]={"","","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"};public:voidCombinations(conststring&
digits
在冬天去看海
·
2024-02-07 21:26
leetcode
算法
职场和发展
Day 37 | 贪心 738.单调递增的数字 、 968.监控二叉树 、 总结
classSolution{publicintmonotoneIncreasing
Digits
(intn){Strings=String.valueOf(n);char[]chars=s.toCharArray
小小白和纯牛奶
·
2024-02-07 20:48
二月红
贪心算法
算法
力扣
java
上一页
1
2
3
4
5
6
7
8
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他