結果
問題 |
No.442 和と積
|
ユーザー |
|
提出日時 | 2018-06-13 01:40:10 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 142 ms / 1,000 ms |
コード長 | 330 bytes |
コンパイル時間 | 3,687 ms |
コンパイル使用メモリ | 77,548 KB |
実行使用メモリ | 41,736 KB |
最終ジャッジ日時 | 2024-07-04 23:13:58 |
合計ジャッジ時間 | 6,809 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
import java.util.*; import java.math.*; public class No442_alt2{ 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)); } }