Last active
September 24, 2019 09:06
-
-
Save domperor/e6492336e0650cc2ba4fef4d7674b94c to your computer and use it in GitHub Desktop.
AtCoder Beginners Selection 7. ABC 085 B - Kagami Mochi solved in plain TeX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\read-1to\N | |
\newcount\n | |
\n\N | |
\newcount\c | |
\def\loop{\read-1to\I | |
\expandafter\ifx\csname\I\endcsname\relax | |
\expandafter\def\csname\I\endcsname{}\advance\c1 | |
\fi | |
\ifnum\the\n>1\advance\n-1\loop\fi} | |
\loop | |
\immediate\write16{\the\c} | |
\end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment