結果
問題 |
No.442 和と積
|
ユーザー |
![]() |
提出日時 | 2016-11-27 09:11:00 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 130 ms / 1,000 ms |
コード長 | 355 bytes |
コンパイル時間 | 1,950 ms |
コンパイル使用メモリ | 74,028 KB |
実行使用メモリ | 54,252 KB |
最終ジャッジ日時 | 2024-07-04 22:45:07 |
合計ジャッジ時間 | 5,440 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
package no441; import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); BigInteger a = sc.nextBigInteger(); BigInteger b = sc.nextBigInteger(); BigInteger sum = a.add(b); BigInteger mul = a.multiply(b); System.out.println(sum.gcd(mul)); } }