Hackerrank - Solve Me First Solution
- Published
- Updated
- Reading time
- 1 min read
- Length
- 87 words
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
a = 2
b = 3Sample Output
5Explanation
The sum of the two integers a and b is computed as: 2+3 =5.
Solution in Python
def solveMeFirst(a,b):
return a+b
num1 = int(input())
num2 = int(input())
res = solveMeFirst(num1,num2)
print(res)