# HackerRank Solve Me First problem solution

In this HackerRank Solve Me First problem solution Complete the function solveMeFirst to compute the sum of two integers.

Example

a = 7

b = 3

Return 10.

Function Description

Complete the solveMeFirst function in the editor below.

solveMeFirst has the following parameters:

1. int a: the first value
2. int b: the second value

Returns

- int: the sum of a and b

## Problem solution in Python programming.

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

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

## Problem solution in Java Programming.

```import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Solution {

static int solveMeFirst(int a, int b) {
return a+b;
}

public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int _a = in.nextInt();
int _b = in.nextInt();
int sum = solveMeFirst(_a, _b);
System.out.println(sum);
}
}```

### Problem solution in C++ programming.

```#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;

int solveMeFirst(int a, int b) {
return a+b;
}
int main() {
int num1, num2;
int sum;
cin>>num1>>num2;
sum = solveMeFirst(num1,num2);
cout<<sum;
return 0;
}```

### Problem solution in C programming.

```#include <stdio.h>
#include <stdlib.h>

int main() {
int num1,num2,sum;
scanf("%d %d",&num1,&num2);
sum = num1+num2;
printf("%d",sum);
return 0;
}```

### Problem solution in JavaScript programming.

```process.stdin.resume();
process.stdin.setEncoding('ascii');

var input = "";

process.stdin.on('data', function (data) {
input += data;
});

process.stdin.on('end', function () {
var inputArray = input.split("\n");
var res;
var a = parseInt(inputArray[0], 10);
var b = parseInt(inputArray[1], 10);
console.log(a+b);

});```