Integers separated by commas, such as 1,2,3, are given on one line from standard input. Output the sum of all the integers on one line.
Constraints
There are 1 to 100 integers, 0 ≤ each integer ≤ 1000
Input example 1
1,2,3Output example 1
6Input example 2
10,20Output example 2
30What you'll train
Specify the input
What you get
How to ask the AI
Make it clear to the AI that the input is separated by commas, not spaces. It's also safer to mention that a specific delimiter must be given to split and that the strings need to be converted to integers.
If you ask vaguelyIf the delimiter isn't specified, using the default split() will fail to split on commas.
あなたのコード
プレビュー
AIレビュー(プロンプト練習)
コードはChatGPTやClaudeに出させたものを貼って構いません。
ここでの本番は「次にAIへ出す指示」です。評価軸は1つだけ見て、弱点・指示の穴・改善例を返します。
テストに落ちていてもレビューできます。落ちた理由と、指示に足りなかった情報を結びつけます。