結果

問題 No.2007 Arbitrary Mod (Easy)
ユーザー kitamoto0407
提出日時 2022-07-28 18:08:22
言語 Java
(openjdk 23)
結果
AC  
実行時間 52 ms / 2,000 ms
コード長 526 bytes
コンパイル時間 1,961 ms
コンパイル使用メモリ 74,724 KB
実行使用メモリ 37,352 KB
最終ジャッジ日時 2024-07-18 08:46:19
合計ジャッジ時間 6,356 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.math.*;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        
        String[] input = br.readLine().split(" ");
        
        BigInteger a = new BigInteger(input[0]);
        BigInteger n = new BigInteger(input[1]);
        
        BigInteger M = new BigInteger("10000000000");
        
        System.out.println(M);
        System.out.println(a.modPow(n, M));
    }
}
0