結果
問題 |
No.167 N^M mod 10
|
ユーザー |
|
提出日時 | 2015-07-27 00:58:08 |
言語 | Java (openjdk 23) |
結果 |
RE
|
実行時間 | - |
コード長 | 336 bytes |
コンパイル時間 | 4,286 ms |
コンパイル使用メモリ | 74,640 KB |
実行使用メモリ | 94,316 KB |
最終ジャッジ日時 | 2024-07-16 00:23:01 |
合計ジャッジ時間 | 11,132 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 RE * 4 TLE * 1 -- * 10 |
ソースコード
import java.util.*; import java.math.*; public class nmMod{ public static void main(String... args){ Scanner scan = new Scanner(System.in); String n = scan.next();int m = scan.nextInt(); BigInteger N = new BigInteger(n); BigInteger base = N.pow(m); BigInteger t = new BigInteger("10"); System.out.println(base.mod(t)); } }