% -*- mode:latex; mode:flyspell -*-
\documentclass[a4paper]{exam}
\input{test-common}

\begin{document}

\newcommand{\head}[1]{ \noindent %
  Discrete mathematics 1. \today, \textbf{Problem sheet #1}, %
  Name: \underline{\hspace{4cm}} NC: \underline{\hspace{1cm}} %
}
%

\head{A}

%\hrule\vspace{1mm}
\vfill
\head{B}

\end{document}

