D. Recover it!(素数筛) Codeforces Round #565 (Div. 3)

NoSuchKey