Sum two numbers


Submit solution



Points:100 (partial)
Time limit:0.3s
Memory limit:32M
Author:

Tags
Uncategorized
Difficulty
Preparation

Write a program that reads two numbers from the standard input and prints their sum.

Input

  • The input will consist of two lines
  • Each line will contain a number between -1500000 and 1500000

Output

  • You should print a single line with the result of summing the two numbers

Constraints

  • The numbers will be between -1500000 and 1500000

Input

2
2

Output

4

Input

-1
3

Output

2

Input

-2
-5

Output

-7

Comments


  • 0
    ivan.kirov
     commented on Dec. 8, 2018 edited

    del


  • 0
    velimiravassileva
     commented on Dec. 5, 2018

    Compilation Error Invalid package Test: do not declare package Бихте ли ми помогнали? Дава ми по-горния текст , ето го и кода ми package Test;

    import java.util.Scanner;

    public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num1 = sc.nextInt();
        int num2 = sc.nextInt();
    
        System.out.println( num1 + num2);
    }

    }


    • 0
      ivan.kirov
       commented on Dec. 8, 2018

      Изтрий "package Test;" Важи за всички задачи - "do not declare package".