No.1176 Few Questions
タグ : / 解いたユーザー数 201
作問者 :
PCTprobability
/ テスター :
Kak1_n0_tane
Problem Statement
(21:42 Corrected the writing style of the problem statement. This does not affect the content.)
PCT is going to create an exam consisting of $M$ questions, each with $N$ choices.
You are given a positive integer $A$.
Find the minimum value of $NM$ when positive integers $N,M$ are chosen so that the following condition is satisfied.
・When $A$ people take the exam, it is possible that there exists no "pair of $2$ people whose answers match on all questions".
Here, each person selects exactly $1$ choice for each question.
Input
$A$
All inputs are integers.
$2 \le A \le 10^{18}$
Output
Print a newline at the end.
Sample
Sample 1
Input
15
Output
8
$2$ questions with $4$ choices each, for example, is optimal.
Sample 2
Input
43234328
Output
51
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。