Problem #PRU-100567

Problems Methods Pigeonhole principle Pigeonhole principle (other)

Problem

A math circle student Emilio wrote a computer program for his house robot, Basil. Starting from 1, Basil should keep writing bigger and bigger numbers formed by 1s: 1, 11, 111, etc. The program terminates when Basil writes a number that is a multiple of 19. Prove that the program will terminate in fewer than 20 steps.