Skip to content
the poor coder

Hackerrank - Solve Me First Solution

Poor Man
Published
Updated
Reading time
1 min read

Complete the function solveMeFirst to compute the sum of two integers.

Function prototype:

int solveMeFirst(int a, int b);

where,

  • a is the first integer input.
  • b is the second integer input

Return values

  • sum of the above two integers

Sample Input

Text
a = 2
b = 3

Sample Output

Text
5

Explanation

The sum of the two integers a and b is computed as: 2+3 =5.

Solution in Python

Python
def solveMeFirst(a,b):
	return a+b

num1 = int(input())
num2 = int(input())
res = solveMeFirst(num1,num2)
print(res)

Keep going

ESC