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

阅读 87

2022-07-13

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)

0 0 举报