Array ( [0] => [1] => questions [2] => Codevita-Previous-Questions [3] => Sum-of-Two-Numbers ) Basic | Sum of Two Numbers | THE INQUISITIVE





Sum of Two Numbers

LEVEL:Beginner

Description

Given two integers. You have to find the sum of those two numbers.

Input Format

First line contains two integers separated by space.

Output Format

Returns the sum of two numbers.


Example 1:

Input
1 3
Output
4
Example 2:

Input
5 7
Output
12
Example 3:

Input
10 12
Output
22

oops

Login to see Discussion




Approach

add the two numbers and return the result

Time Complexity: O(1)
Space Complexity: O(1)


Note :

Let us know if you can come up with a better approach, mail us at support@theinquisitive.in Your approach will be reviewed and posted with credits to you.

oops

Login to see Solution