\documentclass[a4paper]{article}
\renewcommand{\baselinestretch}{1.5}
\topmargin -30mm \oddsidemargin 0mm \evensidemargin 0mm \textwidth 180mm \textheight 237mm
\addtolength{\headsep}{13mm}
\newif\ifpdf
\ifx\pdfoutput\undefined
\pdffalse
\else
\pdfoutput=1
\pdftrue
\fi
\ifpdf
\usepackage[pdftex]{graphicx}
\pdfcompresslevel=9
\else
\usepackage[dvips]{graphicx}
\fi
\ifpdf
\DeclareGraphicsExtensions{.jpg,.pdf,.mps,.png}
\fi
\usepackage{fancyhdr}
\usepackage{afterpage}
\usepackage{lastpage}
\usepackage{listings}
\usepackage{CJK,CJKnumb}
\usepackage{indentfirst}
\usepackage{esint}
\begin{document}
\begin{CJK*}{GBK}{song}
\CJKtilde \CJKindent
\newcounter{mynum}
\newcounter{subnum}[mynum]
\newcommand{\dati}{\stepcounter{mynum}\CJKnumber{\arabic{mynum}}、\ }
\newcommand{\xiaoti}{\stepcounter{subnum}\arabic{subnum}.\ }
\newcommand{\kg}[1]{\,\underline{\hspace{#1em}}\,}
\newsavebox{\firstpgframe}
\sbox{\firstpgframe}{\parbox{157mm}{
\begin{center}
\begin{minipage}[t][153mm][t]{157mm}
\makebox[4mm][l]{\fbox{\parbox[t][153mm][t]{157mm}{\ }}}
\end{minipage}
\end{center}
}}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\newsavebox{\otherpgframe}
\sbox{\otherpgframe}{\parbox{157mm}{
\begin{center}
\begin{minipage}[t][224mm][t]{157mm}
\makebox[4mm][l]{\fbox{\parbox[t][226mm][t]{157mm}{\ }}}
\end{minipage}
\end{center}
}}
\vspace{4mm}
\large
\CJKindent
\newenvironment{mytext}
{\begin{list}{}{%
\setlength{\leftmargin}{15mm}
\setlength{\rightmargin}{12mm}
}\item[]}{\end{list}}
\begin{mytext}
\xiaoti 等式:$\overline{\text{南京}54}=39\times \overline{1\text{市}6}$南京市恰好出现1、2、3、4、$\cdots$、9九个数字,“南京市”代表的三位数是\underline{\makebox[34mm][c]{}}。
\end{mytext}
\clearpage
\end{CJK*}
\end{document}