CodeDrill
day_streak: --
← 問題一覧に戻る
Python ・ Standard I/O

Problem 7: Sum of two numbers

Two integers A and B are given on a single line from standard input, separated by a half-width space. Output the value of A + B on one line.

Constraints

1 ≤ A, B ≤ 1000

Input example 1

3 5

Output example 1

8

Input example 2

10 20

Output example 2

30

What you'll train

Specify the input

What you get

  • Specify the input format
  • Convey the delimiter
  • Convey the output format

How to ask the AI

Clearly state that the input is given as two integers A and B on one line separated by a half-width space, and convey the input/output format: compute the sum and output it on one line.

If you ask vaguelyIf you don't convey the input format, the AI might write code that reads A and B from separate lines.

あなたのコード

実行しました

プレビュー

AIレビュー(プロンプト練習)

コードはChatGPTやClaudeに出させたものを貼って構いません。
ここでの本番は「次にAIへ出す指示」です。評価軸は1つだけ見て、弱点・指示の穴・改善例を返します。
テストに落ちていてもレビューできます。落ちた理由と、指示に足りなかった情報を結びつけます。

先にコードを実行し、テストを1つ以上通してください。