Codeforces Round #499 (Div. 2) C. Fly(数学+思维模拟)

NoSuchKey