From standard input, two integers A and B are given on one line, separated by a single space. Output the quotient and remainder of A divided by B, separated by a single space, on one line.
For example, if A is 7 and B is 3, the quotient is 2 and the remainder is 1, so you output 2 1.
Constraints
1 ≤ A ≤ 1000, 1 ≤ B ≤ 1000
Input example 1
7 3Output example 1
2 1Input example 2
10 5Output example 2
2 0What you'll train
Specify the output
What you get
How to ask the AI
Clearly state the order in which to output the quotient and remainder, separated by a single space. Also specifying how to handle negative values of A and B helps prevent mistakes.
If you ask vaguelyWhen negative numbers are involved, Python's behavior for // and % might not match the intended definition of quotient and remainder.
あなたのコード
プレビュー
AIレビュー(プロンプト練習)
コードはChatGPTやClaudeに出させたものを貼って構いません。
ここでの本番は「次にAIへ出す指示」です。評価軸は1つだけ見て、弱点・指示の穴・改善例を返します。
テストに落ちていてもレビューできます。落ちた理由と、指示に足りなかった情報を結びつけます。