結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,148 KB
testcase_01 AC 82 ms
15,352 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 82 ms
15,372 KB
testcase_05 AC 80 ms
15,112 KB
testcase_06 AC 81 ms
15,348 KB
testcase_07 AC 80 ms
15,292 KB
testcase_08 AC 81 ms
15,232 KB
testcase_09 AC 81 ms
15,084 KB
testcase_10 AC 82 ms
15,160 KB
testcase_11 AC 81 ms
15,064 KB
testcase_12 AC 80 ms
15,088 KB
testcase_13 WA -
testcase_14 AC 82 ms
15,260 KB
testcase_15 WA -
testcase_16 AC 80 ms
15,040 KB
testcase_17 AC 82 ms
15,308 KB
testcase_18 AC 81 ms
15,292 KB
testcase_19 AC 80 ms
15,288 KB
testcase_20 AC 81 ms
15,140 KB
testcase_21 AC 80 ms
15,168 KB
testcase_22 AC 82 ms
15,620 KB
testcase_23 AC 79 ms
15,376 KB
testcase_24 AC 79 ms
15,360 KB
testcase_25 AC 80 ms
15,524 KB
testcase_26 AC 81 ms
15,620 KB
testcase_27 AC 81 ms
15,648 KB
testcase_28 AC 81 ms
15,484 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a,b=$<.map &:to_i
c=b%4
d=a%10
p b<1?1:d<2?d: d<3?[4,6,4,6][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