結果

問題 No.442 和と積
ユーザー fal_rndfal_rnd
提出日時 2016-11-11 22:29:03
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 1,000 ms
コード長 280 bytes
コンパイル時間 1,866 ms
コンパイル使用メモリ 72,540 KB
実行使用メモリ 56,328 KB
最終ジャッジ日時 2023-09-18 05:59:30
合計ジャッジ時間 5,340 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,604 KB
testcase_01 AC 119 ms
56,328 KB
testcase_02 AC 120 ms
55,872 KB
testcase_03 AC 120 ms
55,392 KB
testcase_04 AC 120 ms
56,108 KB
testcase_05 AC 116 ms
55,340 KB
testcase_06 AC 119 ms
55,792 KB
testcase_07 AC 120 ms
55,944 KB
testcase_08 AC 119 ms
55,572 KB
testcase_09 AC 119 ms
55,324 KB
testcase_10 AC 121 ms
55,784 KB
testcase_11 AC 129 ms
55,392 KB
testcase_12 AC 121 ms
55,400 KB
testcase_13 AC 121 ms
55,780 KB
testcase_14 AC 122 ms
55,632 KB
testcase_15 AC 120 ms
55,932 KB
testcase_16 AC 122 ms
55,912 KB
testcase_17 AC 120 ms
55,604 KB
testcase_18 AC 119 ms
55,992 KB
testcase_19 AC 119 ms
55,880 KB
testcase_20 AC 121 ms
55,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.math.BigInteger;
import java.util.Scanner;
class B{
	static Scanner s = new Scanner(System.in);
	public static void main(String[] args) {
		BigInteger a=s.nextBigInteger(), b=s.nextBigInteger(),
		s = a.add(b),
		p = a.multiply(b);
		System.out.println(s.gcd(p));
	}
}
0