CodeDrill
day_streak: --
← 問題一覧に戻る
Python ・ Standard I/O

Problem 54: Is It Strictly Increasing?

An integer N is given on the first line, and N integers are given on the second line, separated by spaces. If the sequence is always strictly increasing (left < right for every pair of adjacent elements), output Yes; otherwise, output No. When N is 1, output Yes.

Constraints

1 ≤ N ≤ 100, 0 ≤ each element ≤ 1000

Input example 1

4
1 3 5 9

Output example 1

Yes

Input example 2

3
2 2 3

Output example 2

No

What you'll train

Cover the edge cases

What you get

  • Write the N=1 boundary case
  • Specify how equal values are handled
  • Make the comparison direction explicit

How to ask the AI

Clearly tell the AI that when N=1 the answer is unconditionally Yes, and that equal adjacent values should not be considered increasing.

If you ask vaguelyMistakenly judging equal adjacent values as "increasing."

あなたのコード

実行しました

プレビュー

AIレビュー(プロンプト練習)

コードはChatGPTやClaudeに出させたものを貼って構いません。
ここでの本番は「次にAIへ出す指示」です。評価軸は1つだけ見て、弱点・指示の穴・改善例を返します。
テストに落ちていてもレビューできます。落ちた理由と、指示に足りなかった情報を結びつけます。

先にコードを実行し、テストを1つ以上通してください。