結果

問題 No.167 N^M mod 10
ユーザー mmmpppmmmppp
提出日時 2017-03-04 19:01:22
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 150 bytes
コンパイル時間 64 ms
コンパイル使用メモリ 11,468 KB
実行使用メモリ 15,736 KB
最終ジャッジ日時 2023-09-05 05:32:56
合計ジャッジ時間 3,674 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
15,256 KB
testcase_01 AC 82 ms
15,316 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 81 ms
15,440 KB
testcase_05 AC 80 ms
15,088 KB
testcase_06 AC 81 ms
15,344 KB
testcase_07 AC 81 ms
15,168 KB
testcase_08 WA -
testcase_09 AC 80 ms
15,156 KB
testcase_10 AC 80 ms
15,168 KB
testcase_11 AC 80 ms
15,268 KB
testcase_12 AC 81 ms
15,288 KB
testcase_13 AC 81 ms
15,156 KB
testcase_14 AC 81 ms
15,152 KB
testcase_15 AC 81 ms
15,236 KB
testcase_16 AC 81 ms
15,280 KB
testcase_17 AC 81 ms
15,248 KB
testcase_18 AC 81 ms
15,280 KB
testcase_19 AC 81 ms
15,240 KB
testcase_20 AC 81 ms
15,080 KB
testcase_21 AC 82 ms
15,144 KB
testcase_22 AC 80 ms
15,624 KB
testcase_23 AC 81 ms
15,508 KB
testcase_24 AC 82 ms
15,736 KB
testcase_25 AC 80 ms
15,380 KB
testcase_26 AC 81 ms
15,440 KB
testcase_27 AC 81 ms
15,520 KB
testcase_28 AC 82 ms
15,516 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a,b=$<.map &:to_i
c=b%4
d=a%10
p b<1?1:d<2?d: d<3?[6,2,8,4][c]:d<4?[1,3,9,7][c]:d<5?[6,4,6,4][c]:d<7?d: d<8?[1,7,9,3][c]:d<9?[6,8,4,2][c]:[1,9,1,9][c]
0