String Number Addition

Large numbers are often stored as strings so they are not limited by regular numeric types. Given two strings num1 and num2 containing non-negative integers, return their sum as a string. Add the digits carefully, and do not convert the whole input strings directly to int.

Примеры

Ввод
"11", "123"
Вывод
"134"
Ввод
"456", "77"
Вывод
"533"
Ввод
"0", "0"
Вывод
"0"

Нужно реализовать

def add_strings(num1: str, num2: str) -> str:

Теги

stringsmath
PostgreSQLv16

Hawn jidher ir-riżultat tat-tħaddim tal-kodiċi

Visible tests
1
Input
"11", "123"
Expected"134"
2
Input
"456", "77"
Expected"533"
3
Input
"0", "0"
Expected"0"
4
Input
"99", "1"
Expected"100"
5
Input
"1", "9999"
Expected"10000"
6
Input
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "77"
Expected"8000000000000000000000000000069"
Focus radio
Paused · SomaFM · Fluid