mirror of
https://github.com/chefyuan/algorithm-base.git
synced 2024-12-27 12:56:17 +00:00
chefyuan
This commit is contained in:
parent
412db7a7d8
commit
475db0e123
@ -86,7 +86,7 @@ class Solution {
|
||||
int sum = l1num+l2num+summod;
|
||||
//更新进位值,例18/10=1,9/10=0
|
||||
summod = sum/10;
|
||||
//新节点保存的值,18%8=8,则添加8
|
||||
//新节点保存的值,18 % 8=2,则添加2
|
||||
sum = sum%10;
|
||||
//添加节点
|
||||
tempnode.next = new ListNode(sum);
|
||||
|
Loading…
Reference in New Issue
Block a user