An integer N is given on the first line, and N integers separated by single spaces are given on the second line. Remove duplicates while preserving the order in which they first appeared, and output them on one line separated by single spaces.
Constraints
1 ≤ N ≤ 100, 0 ≤ each element ≤ 1000
Input example 1
5
1 2 1 3 2Output example 1
1 2 3Input example 2
3
7 7 7Output example 2
7What you'll train
State the constraints
What you get
How to ask the AI
Tell the AI that duplicates need to be removed while preserving the order in which they first appeared. It's also good to point out that using a set will break the original order.
If you ask vaguelyRemoving duplicates with a set doesn't guarantee the original order of appearance, which can result in an unintended output order.
あなたのコード
プレビュー
AIレビュー(プロンプト練習)
コードはChatGPTやClaudeに出させたものを貼って構いません。
ここでの本番は「次にAIへ出す指示」です。評価軸は1つだけ見て、弱点・指示の穴・改善例を返します。
テストに落ちていてもレビューできます。落ちた理由と、指示に足りなかった情報を結びつけます。