You are given an integer N on the first line, and N integers separated by single spaces on the second line. Output the sum of all of them on one line.
Constraints
1 ≤ N ≤ 100, 0 ≤ each element ≤ 1000
Input example 1
3
1 2 3Output example 1
6Input example 2
5
10 20 30 40 50Output example 2
150What you'll train
Specify the input
What you get
How to ask the AI
Clearly convey the input format: N on the first line, followed by N space-separated integers on the second line. It's reassuring to also mention that when N=0, the second line may be empty.
If you ask vaguelyWhen N=0 and the second line is empty, the AI might cause an error while reading the input.
あなたのコード
プレビュー
AIレビュー(プロンプト練習)
コードはChatGPTやClaudeに出させたものを貼って構いません。
ここでの本番は「次にAIへ出す指示」です。評価軸は1つだけ見て、弱点・指示の穴・改善例を返します。
テストに落ちていてもレビューできます。落ちた理由と、指示に足りなかった情報を結びつけます。