java:

import java.util.Scanner;      
public class Main {
public static void main(String[] args) {           Scanner scanner = new Scanner(System.in); 
int a = scanner.nextInt();           
int b = scanner.nextInt();           System.out.println(a + b);           scanner.close();       }   }

bash:

#!/bin/bash
      read -p "请输入整数a: " a
      read -p "请输入整数b: " b
      echo \$((a + b))

JavaScript:

const readline = require('readline').createInterface({       
input: process.stdin, 
      output: process.stdout   });      readline.question('请输入整数a: ', (a) => { 
      readline.question('请输入整数b: ', (b) => {           
const sum = parseInt(a) + parseInt(b);
           console.log(sum);           readline.close(); 
      });   });

c++

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

python:

a=int(input())
b=int(input())
print(a+b)

终于写完啦!!

1 comments

  • 1

Information

ID
1
Time
1000ms
Memory
256MiB
Difficulty
6
Tags
(None)
# Submissions
5617
Accepted
1850
Uploaded By