Pregunta de entrevista de SAP

for the coding interview, they asked the two sums problem