A+B Problem

A+B Problem

Description

给出两个数\(a,b\),输出它们的和

Format

Input

一行,两个整数\(x,y\)

Output

一个整数,表示它们的和

Sample

Input

123 500

Output

623

Limitation

\(1\leq a,b \leq 32767\)

Solution

Free Pascal Code

var a,b:longint;
begin
    readln(a,b);
    writeln(a+b);
end.

C Code

#include <stdio.h>
int main(void)
{
    int a, b;
    scanf("%d%d", &a, &b);
    printf("%d\n", a + b);
    return 0;
}

C++ Code

#include <iostream>
using namespace std;
int main()
{
    int a, b;
    cin >> a >> b;
    cout << a + b << endl;
    return 0;
}

Python Code

a, b = [int(i) for i in raw_input().split()]
print(a + b)

Java Code

import java.io.*;
import java.util.Scanner;

public class Main {

    /**
     * @param args
     * @throws IOException 
     */
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        System.out.println(a + b);
    }
}

信息

ID
1000
难度
1
分类
(无)
标签
(无)
递交数
6
已通过
5
通过率
83%
上传者