結果

問題 No.442 和と積
コンテスト
ユーザー darknight
提出日時 2016-11-11 23:14:37
言語 Java
(openjdk 25.0.2)
コンパイル:
javac -encoding UTF8 _filename_
実行:
java -ea -Xmx700m -Xss256M -DONLINE_JUDGE=true _class_
結果
AC  
実行時間 53 ms / 1,000 ms
+ 238µs
コード長 646 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,570 ms
コンパイル使用メモリ 84,092 KB
実行使用メモリ 43,184 KB
最終ジャッジ日時 2026-08-07 00:19:53
合計ジャッジ時間 4,032 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import java.util.*;
import java.math.BigInteger;
 
public class Main {
	public static void main(String[] args) {
 
	Scanner sc  = new Scanner(System.in);
	String str = "";
        
    String str3  = sc.next();
    String str2 = sc.next();
    BigInteger big1 = new  BigInteger( str3 );
    BigInteger big2 = new BigInteger( str2 );
    
    BigInteger big3 = new  BigInteger( str3 );
    BigInteger big4 = new BigInteger( str2 );
    
    BigInteger big5 = big1.add(big2);
    BigInteger big6 = big3.multiply(big4);
    
   // BigInteger big7 =  gcd( big5, big6);
    

    System.out.print( big5.gcd(big6) );
        System.out.println( );
	}
}
0