Discrete Logarithm Problem

UVALive - 7457