An integer N is given on the first line, and N integers separated by half-width spaces are given on the second line. Print, on one line, how many distinct kinds of numbers there are among them. No matter how many times the same number appears, count it as one kind.
For example, for 1 2 2 3 3, there are 3 distinct kinds (1, 2, 3), so print 3.
Constraints
1 ≤ N ≤ 100, 0 ≤ each element ≤ 1000
Input example 1
5
1 2 2 3 3Output example 1
3Input example 2
4
1 1 1 1Output example 2
1What you'll train
Cover the edge cases
What you get
How to ask the AI
Tell the AI the condition that no matter how many times the same number appears, it should be counted as one kind. Showing the result for cases where all numbers are identical or all are different, with concrete examples, conveys your intent accurately.
If you ask vaguelyIf you only say "count the number of kinds," the AI may count the total number of elements without removing duplicates.
あなたのコード
プレビュー
AIレビュー(プロンプト練習)
コードはChatGPTやClaudeに出させたものを貼って構いません。
ここでの本番は「次にAIへ出す指示」です。評価軸は1つだけ見て、弱点・指示の穴・改善例を返します。
テストに落ちていてもレビューできます。落ちた理由と、指示に足りなかった情報を結びつけます。