4 Antworten
+ 2
The first thing that i noticed is that you access to items-unallocated vector with
digits[k] = n2 % 10;
you have to do digits.push_back because you dont allocated the space for the items
0
thanks, but it still doesn't work
0
Different approach here.
https://code.sololearn.com/cedLjOFg5aYR/?ref=app
0
Better approach
https://code.sololearn.com/ctzeVloZzdw7/?ref=app