An integer N is given on one line. If N is a prime number, output Yes; otherwise, output No.
A prime number is an integer of 2 or greater that has no divisors other than 1 and itself (1 is not a prime number).
Constraints
1 ≤ N ≤ 1000000
Input example 1
7Output example 1
YesInput example 2
10Output example 2
NoWhat you'll train
Cover the edge cases
What you get
How to ask the AI
Tell the AI how to judge cases like N=1, N=2, or negative numbers. Also state clearly that 1 is not a prime number, to prevent misjudgment.
If you ask vaguelyMistakenly judging 1 as a prime number, or implementing the logic without clearly handling numbers less than 2.
あなたのコード
プレビュー
AIレビュー(プロンプト練習)
コードはChatGPTやClaudeに出させたものを貼って構いません。
ここでの本番は「次にAIへ出す指示」です。評価軸は1つだけ見て、弱点・指示の穴・改善例を返します。
テストに落ちていてもレビューできます。落ちた理由と、指示に足りなかった情報を結びつけます。