Interactive Factorial Guessing
면접 대비시간 제한3.5초메모리 제한1024 MB
정해진 정수 n을 찾기 위해 n!의 원하는 자릿수를 최대 10번 물어볼 수 있으며, 팩토리얼 끝의 0 개수를 이용해 n을 좁힌다.
문제
Oh no, this wicked jury hides something from you again, and you need to guess it interactively.
This time, you need to find an integer . To do that, you can make at most 10 queries of the form "What is the -th decimal digit of the product of all integers from 1 to (also known as factorial and denoted as )?".