結果

問題 No.167 N^M mod 10
ユーザー wotsushiwotsushi
提出日時 2017-02-05 08:52:23
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 70 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 11,192 KB
実行使用メモリ 15,684 KB
最終ジャッジ日時 2023-08-25 20:24:44
合計ジャッジ時間 4,180 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 78 ms
15,628 KB
testcase_03 AC 78 ms
15,364 KB
testcase_04 WA -
testcase_05 AC 78 ms
15,160 KB
testcase_06 WA -
testcase_07 AC 78 ms
15,128 KB
testcase_08 AC 77 ms
15,052 KB
testcase_09 AC 79 ms
15,148 KB
testcase_10 WA -
testcase_11 AC 77 ms
15,084 KB
testcase_12 AC 78 ms
15,168 KB
testcase_13 WA -
testcase_14 AC 78 ms
15,084 KB
testcase_15 AC 77 ms
15,052 KB
testcase_16 AC 79 ms
15,160 KB
testcase_17 AC 78 ms
15,076 KB
testcase_18 AC 78 ms
15,048 KB
testcase_19 AC 79 ms
15,160 KB
testcase_20 AC 78 ms
15,088 KB
testcase_21 AC 79 ms
15,128 KB
testcase_22 AC 79 ms
15,684 KB
testcase_23 AC 78 ms
15,492 KB
testcase_24 AC 79 ms
15,412 KB
testcase_25 AC 79 ms
15,368 KB
testcase_26 AC 79 ms
15,520 KB
testcase_27 WA -
testcase_28 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N = gets.to_i
M = gets.to_i
ans = ((N % 10) ** (M % 4)) % 10
puts ans
0