結果

問題 No.3062 A + B
ユーザー ks2mks2m
提出日時 2020-04-01 22:09:40
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 449 bytes
コンパイル時間 2,247 ms
コンパイル使用メモリ 78,324 KB
実行使用メモリ 50,168 KB
最終ジャッジ日時 2023-09-09 18:26:58
合計ジャッジ時間 3,591 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
49,660 KB
testcase_01 AC 46 ms
49,476 KB
testcase_02 AC 49 ms
49,704 KB
testcase_03 AC 43 ms
49,316 KB
testcase_04 AC 42 ms
49,464 KB
testcase_05 AC 46 ms
49,512 KB
testcase_06 AC 42 ms
49,260 KB
testcase_07 AC 46 ms
49,644 KB
testcase_08 WA -
testcase_09 AC 42 ms
49,392 KB
testcase_10 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] sa = br.readLine().split(" ");
		long a = Long.parseLong(sa[0]);
		long b = Long.parseLong(sa[1]);
		br.close();

		if (b < 0) {
			System.out.println(a + b);
		} else {
			System.out.println(sa[0] + sa[1]);
		}
	}
}
0