結果

問題 No.167 N^M mod 10
ユーザー MaxMellonMaxMellon
提出日時 2015-08-13 17:01:29
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 97 bytes
コンパイル時間 58 ms
コンパイル使用メモリ 11,240 KB
実行使用メモリ 18,588 KB
最終ジャッジ日時 2023-09-25 11:27:23
合計ジャッジ時間 3,865 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 104 ms
17,312 KB
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 AC 130 ms
18,588 KB
testcase_06 AC 80 ms
15,200 KB
testcase_07 AC 80 ms
15,256 KB
testcase_08 AC 81 ms
15,248 KB
testcase_09 AC 79 ms
15,416 KB
testcase_10 AC 80 ms
15,380 KB
testcase_11 AC 81 ms
15,160 KB
testcase_12 AC 81 ms
15,152 KB
testcase_13 AC 81 ms
15,272 KB
testcase_14 AC 80 ms
15,208 KB
testcase_15 AC 79 ms
15,412 KB
testcase_16 AC 81 ms
15,720 KB
testcase_17 AC 83 ms
16,136 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 AC 80 ms
15,672 KB
testcase_27 RE -
testcase_28 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

require 'bigdecimal'
n = gets.chomp.to_i
m = gets.chomp.to_i
puts (BigDecimal(n ** m) % 10).to_i
0