問題一覧 > 通常問題

No.1176 Few Questions

レベル : / AI推定難易度 : 1025 / 実行時間制限 : 1ケース 1.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (解説公開後に AC するまで非表示) / 解いたユーザー数 201
作問者 : PCTprobability / テスター : Kak1_n0_tane
お気に入りにしたユーザー ProblemId : 4790 / 自分の提出
問題文最終更新日: 2026-10-12 18:33:21
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 262 (順位表) の他の問題:

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もしくは右上の雲マークをクリックしてアカウントを作成してください。