Problem

Source: Slovenia 1998 3rd Grade P4

Tags: number theory



Alf was attending an eight-year elementary school on Melmac. At the end of each school year, he showed the certificate to his father. If he was promoted, his father gave him the number of cats equal to Alf’s age times the number of the grade he passed. During elementary education, Alf failed one grade and had to repeat it. When he finished elementary education he found out that the total number of cats he had received was divisible by $1998$. Which grade did Alf fail?