結果
問題 | No.442 和と積 |
ユーザー |
![]() |
提出日時 | 2016-11-11 22:32:48 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 129 ms / 1,000 ms |
コード長 | 450 bytes |
コンパイル時間 | 2,007 ms |
コンパイル使用メモリ | 75,572 KB |
実行使用メモリ | 54,412 KB |
最終ジャッジ日時 | 2024-07-04 22:21:31 |
合計ジャッジ時間 | 5,597 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
import java.math.BigInteger;import java.util.Arrays;import java.util.HashSet;import java.util.LinkedList;import java.util.Scanner;import java.util.Set;public class Main {public static void main(String[] args) {Scanner sc = new Scanner(System.in);final BigInteger fst = BigInteger.valueOf(sc.nextLong());final BigInteger snd = BigInteger.valueOf(sc.nextLong());System.out.println(fst.add(snd).gcd(fst.multiply(snd)));}}