#1. A+B示例

内存限制:256 MiB 时间限制:1000 ms 标准输入输出
题目类型:传统 评测方式:文本比较
上传者: finedev

题目描述

请计算两个整数的和并输出结果。

输入格式

两个用空格分开的整数。

输出格式

两数之和。

样例

输入

1 2

输出

3

数据范围与提示

Java语言实现

import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        System.setProperty("file.encoding", "utf-8");  // 可以支持中文输入输出
        Scanner in=new Scanner(System.in);
        long a=in.nextLong();
        long b=in.nextLong();
        System.out.println((a+b));  
    }
}

NodeJS语言实现

console.log(require('fs')
                .readFileSync('/dev/stdin')
                .toString()
                .split(/ |\n/)
                .filter(Boolean)
                .map(Number)
                .reduce((x, y) => x + y))

Python语言实现

a, b = map(int,input().strip().split())  
print (a + b)