結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
15,080 KB
testcase_01 AC 84 ms
15,144 KB
testcase_02 AC 83 ms
15,616 KB
testcase_03 AC 81 ms
15,308 KB
testcase_04 AC 82 ms
15,608 KB
testcase_05 AC 82 ms
15,156 KB
testcase_06 AC 82 ms
15,244 KB
testcase_07 AC 83 ms
15,068 KB
testcase_08 AC 81 ms
15,212 KB
testcase_09 AC 81 ms
15,156 KB
testcase_10 AC 83 ms
15,272 KB
testcase_11 AC 82 ms
15,076 KB
testcase_12 AC 83 ms
15,172 KB
testcase_13 AC 81 ms
15,100 KB
testcase_14 AC 82 ms
15,296 KB
testcase_15 WA -
testcase_16 AC 83 ms
14,980 KB
testcase_17 AC 86 ms
15,344 KB
testcase_18 AC 82 ms
15,080 KB
testcase_19 AC 84 ms
15,336 KB
testcase_20 AC 85 ms
15,228 KB
testcase_21 AC 86 ms
15,088 KB
testcase_22 AC 85 ms
15,416 KB
testcase_23 AC 83 ms
15,416 KB
testcase_24 AC 85 ms
15,484 KB
testcase_25 AC 83 ms
15,488 KB
testcase_26 AC 82 ms
15,356 KB
testcase_27 AC 82 ms
15,628 KB
testcase_28 AC 82 ms
15,520 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,4,8][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