結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
15,288 KB
testcase_01 AC 82 ms
15,296 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 82 ms
15,488 KB
testcase_05 AC 81 ms
15,048 KB
testcase_06 AC 82 ms
15,132 KB
testcase_07 AC 82 ms
15,160 KB
testcase_08 WA -
testcase_09 AC 80 ms
15,164 KB
testcase_10 AC 81 ms
15,132 KB
testcase_11 AC 82 ms
15,088 KB
testcase_12 AC 81 ms
15,052 KB
testcase_13 AC 81 ms
15,244 KB
testcase_14 AC 81 ms
15,164 KB
testcase_15 WA -
testcase_16 AC 81 ms
15,252 KB
testcase_17 AC 80 ms
15,164 KB
testcase_18 AC 81 ms
15,140 KB
testcase_19 AC 81 ms
15,136 KB
testcase_20 AC 80 ms
15,304 KB
testcase_21 AC 81 ms
15,264 KB
testcase_22 AC 81 ms
15,516 KB
testcase_23 AC 81 ms
15,516 KB
testcase_24 AC 81 ms
15,492 KB
testcase_25 AC 80 ms
15,560 KB
testcase_26 AC 80 ms
15,500 KB
testcase_27 AC 80 ms
15,500 KB
testcase_28 AC 79 ms
15,628 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,4,6,4][c]:d<4?[1,3,9,7][c]:d<7?d: d<8?[1,7,9,3][c]:d<9?[6,8,4,2][c]:[1,9,1,9][c]
0