結果

問題 No.167 N^M mod 10
ユーザー mmmpppmmmppp
提出日時 2017-03-04 17:16:00
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 168 bytes
コンパイル時間 262 ms
コンパイル使用メモリ 11,348 KB
実行使用メモリ 15,756 KB
最終ジャッジ日時 2023-09-05 05:27:30
合計ジャッジ時間 4,312 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
15,288 KB
testcase_01 AC 85 ms
15,268 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 83 ms
15,700 KB
testcase_05 WA -
testcase_06 AC 81 ms
15,168 KB
testcase_07 AC 82 ms
15,044 KB
testcase_08 WA -
testcase_09 AC 84 ms
15,056 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 83 ms
15,196 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 82 ms
15,260 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 84 ms
15,516 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a,b=$<.map &:to_i
c=b%4
p case d=a%10
when 2;[2,4,8,6][c]
when 3;[3,9,7,1][c]
when 4;[4,6,4,6][c]
when 7;[7,9,3,1][c]
when 8;[8,4,2,6][c]
when 9;[9,1,9,1][c]
else d end
0