Question d’entretien chez SAP

for the coding interview, they asked the two sums problem