結果

問題 No.167 N^M mod 10
ユーザー tsunabit
提出日時 2020-03-09 23:56:39
言語 Java
(openjdk 23)
結果
AC  
実行時間 243 ms / 1,000 ms
コード長 304 bytes
コンパイル時間 3,481 ms
コンパイル使用メモリ 74,708 KB
実行使用メモリ 42,500 KB
最終ジャッジ日時 2024-11-15 19:03:28
合計ジャッジ時間 9,022 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class No167 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		BigInteger n = new BigInteger(sc.next());
		BigInteger m = new BigInteger(sc.next());
		System.out.println(n.modPow(m, BigInteger.TEN));
	}
}
0