What is wrong with my "BUGCAL" solution ?

My soltion for BUGCAL

First I break the numbers into digits, add the digits from the end, store their sum in a vector, reverse the vector and display it.

It gets an AC for the first subtask. But for the second one, it’s a WA. But I have tried eg from the seconds which return the correct answer. But when I submit it gets a WA.

Can someone please point out my mistake!

@bionic_beaver I saw your code

You are printing leading zeroes as well
for eg->
in the test case 19 99
your code is printing 08 whereas the answer is only 8

so remove the leading zeroes, you will get AC

Thank you so much… !