Integers N and K, separated by a half-width space, are given on the first line. N integers separated by half-width spaces are given on the second line. Print, on one line, how many of them are K or greater.
For example, with N=5, K=3 and the sequence 1 2 3 4 5, there are 3 values that are 3 or greater (3, 4, 5), so print 3.
Constraints
1 ≤ N ≤ 100, 0 ≤ K ≤ 1000, 0 ≤ each element ≤ 1000
Input example 1
5 3
1 2 3 4 5Output example 1
3Input example 2
3 10
1 2 3Output example 2
0What you'll train
State the constraints
What you get
How to ask the AI
Clearly tell the AI that the condition "K or greater" includes K itself. This is easily confused with "greater than K," so giving a concrete example (if K=3, then 3 is included) helps prevent misunderstanding.
If you ask vaguelyMisinterpreting "K or greater" as "greater than K" may cause the AI to write code that forgets to count the boundary value equal to K.
あなたのコード
プレビュー
AIレビュー(プロンプト練習)
コードはChatGPTやClaudeに出させたものを貼って構いません。
ここでの本番は「次にAIへ出す指示」です。評価軸は1つだけ見て、弱点・指示の穴・改善例を返します。
テストに落ちていてもレビューできます。落ちた理由と、指示に足りなかった情報を結びつけます。