Adding Big Numbers as Strings

easy
Unit 3 · Strings III0/3 to milestone

Implement add_strings(a, b) and multiply_strings(a, b) for non-negative integers given as digit strings, without converting the whole strings to int. Results have no leading zeros (except "0" itself).

This is how arbitrary-precision arithmetic works under the hood.

#strings#arithmetic2 visible + 1 hidden tests
solution.py · Python 3.13
Loading editor…
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Adding Big Numbers as Strings · TechGradify