\documentclass[a4paper]{article}
\usepackage{multicol}
\usepackage[insidebox,noshuffle,postcorrect]{automultiplechoice}
\usepackage{pgffor}
\begin{document}

\def\AMCbeginQuestion#1#2{\par\noindent{\bf Q #1} #2\hspace*{1em}}
\onecopy{1}{
\noindent

\noindent
\hrulefill
\begin{multicols}{3}\columnseprule=.4pt
    % \foreach \n in {0,...,22}{do something}
    \foreach \subject in {1,2,3}{
    \foreach \n in {1,...,5}{
        \begin{question}{\n}
            \begin{choicescustom}
            \wrongchoice{}%
            \wrongchoice{}%
            \wrongchoice{}%
            \wrongchoice{}%
            \end{choicescustom}
            \end{question}}
    \foreach \n in {1,...,5}{
            \begin{question}{\n}
            \AMCOpen{dots=true,width=1cm,framerule=0.5pt,lineheight=1cm}{\wrongchoice[w]{w}\scoring{0}\correctchoice[c]{c}\scoring{2}}
            \end{question}
    
    }}
\end{multicols}
}
\end{document}