0
点赞
收藏
分享

微信扫一扫

【leetcode_easy_math】1317. Convert Integer to the Sum of Two No-Zero Integers

人间四月天i 2022-07-13 阅读 85
编程语言

problem

​​1317. Convert Integer to the Sum of Two No-Zero Integers​​

solution#1:检查数值中是否含有字符0;

code:

 

solution#2: 通过判断除以10的余数来判断是否含有符号0;

code:

 

注意,理解题目的意思,要求两个加数中不包含数字0;主要是怎么确定是否含有数字0;

参考

1. ​​leetcode_easy_math_1317. Convert Integer to the Sum of Two No-Zero Integers​​;

 

举报

相关推荐

0 条评论