![我怎样才能将一个数字垂直地写在另一个数字之上?](https://linux22.com/image/426959/%E6%88%91%E6%80%8E%E6%A0%B7%E6%89%8D%E8%83%BD%E5%B0%86%E4%B8%80%E4%B8%AA%E6%95%B0%E5%AD%97%E5%9E%82%E7%9B%B4%E5%9C%B0%E5%86%99%E5%9C%A8%E5%8F%A6%E4%B8%80%E4%B8%AA%E6%95%B0%E5%AD%97%E4%B9%8B%E4%B8%8A%EF%BC%9F.png)
答案1
\documentclass{article}
\usepackage{stackengine,amsmath,cancel}
\stackMath
\newcommand\overNot[2]{\stackon[2pt]{\cancel{#1}}{\scriptstyle#2}}
\newcommand\underNot[2]{\stackunder[3pt]{\cancel{#1}}{\scriptstyle#2}}
\begin{document}
\[
x=\frac{\overNot{9}{3}}{\underNot{2}{1}}\times
\frac{\overNot{4}{2}}{\underNot{3}{1}}
\]
\end{document}