(defparameter modint 998244353) (defun modpow (a n) (cond ((= n 0) 1) ((evenp n) (mod (expt (mod (* a a) modint) (/ n 2)) modint)) (t (mod (* a (modpow a (- n 1))) modint)))) (defun solve (n m) (setf n (mod n (* 2 m))) (if (<= n m) (format t "~d~%" (mod (1- (modpow 10 n)) modint)) (let* ((a (modpow 10 m)) (b (modpow 10 (- n m))) (ans (mod (- a b) modint))) (format t "~d~%" ans)))) (defun main () (let ((num-tests (read))) (dotimes (i num-tests) (let* ((n (read)) (m (read))) (solve n m))))) (main)