An integer N is given on the first line, and N integers separated by half-width spaces are given on the second line. Print the minimum and maximum values among them, in this order, separated by a half-width space, on one line.
Constraints
1 ≤ N ≤ 100, 0 ≤ each element ≤ 1000
Input example 1
5
3 1 4 1 5Output example 1
1 5Input example 2
3
10 2 7Output example 2
2 10What you'll train
Specify the output
What you get
How to ask the AI
Tell the AI specifically that the output format should be "minimum, then maximum" on one line separated by a half-width space. The key point is to make it explicit so the order isn't reversed or split across separate lines.
If you ask vaguelyIf you don't specify the output order, the AI may print the maximum value first or separate the values with line breaks.
あなたのコード
プレビュー
AIレビュー(プロンプト練習)
コードはChatGPTやClaudeに出させたものを貼って構いません。
ここでの本番は「次にAIへ出す指示」です。評価軸は1つだけ見て、弱点・指示の穴・改善例を返します。
テストに落ちていてもレビューできます。落ちた理由と、指示に足りなかった情報を結びつけます。