Codeforces Round #508 (Div. 2) C Gambling

NoSuchKey