国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學(xué)院 > 開發(fā)設(shè)計(jì) > 正文

A+B

2019-11-08 02:41:05
字體:
供稿:網(wǎng)友

A+B PRoblem
描述

求兩個整數(shù)A+B的和。

輸入

輸入包含多組數(shù)據(jù)。每組數(shù)據(jù)包含兩個整數(shù)A(1 ≤ A ≤ 100)和B(1 ≤ B ≤ 100)。

輸出

對于每組數(shù)據(jù)輸出A+B的和。

樣例輸入
1 23 45 6
樣例輸出
3711

java 代碼示例1:

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

java 代碼示例2:

import java.util.Scanner;

public class Main {    public static void main(String[] args){        Scanner scan = new Scanner(System.in);        while(scan.hasNext()){            String s = scan.nextLine();            int a = Integer.parseInt(s.split(" ")[0]);            int b = Integer.parseInt(s.split(" ")[1]);            System.out.println(a+b);        }    }}


發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 大埔区| 修文县| 云浮市| 肇源县| 金华市| 成安县| 玉林市| 湟源县| 饶阳县| 文登市| 辽阳县| 敦化市| 平武县| 临朐县| 右玉县| 西畴县| 扎鲁特旗| 华蓥市| 临漳县| 龙游县| 吉水县| 永仁县| 凤庆县| 玉溪市| 古浪县| 行唐县| 北票市| 仙游县| 涪陵区| 晴隆县| 云龙县| 南雄市| 遂川县| 巴林左旗| 沿河| 衡阳市| 三明市| 香港 | 综艺| 绥中县| 鹿泉市|