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

Problem 20: Converting Seconds to Minutes and Seconds

An integer N (a number of seconds) is given on one line from standard input. Convert it into "minutes and seconds", and output the minutes and seconds separated by a single space, on one line.

For example, if N is 125, since 125 seconds is 2 minutes 5 seconds, output 2 5.

Constraints

0 ≤ N ≤ 100000

Input example 1

125

Output example 1

2 5

Input example 2

60

Output example 2

1 0

What you'll train

Specify the output

What you get

  • Specify the output order
  • Specify the delimiter
  • Explain the calculation method

How to ask the AI

Clearly state which of minutes and seconds should be output first, and that the delimiter is a single space. It's reassuring to also consider that when N=0, the output should be 0 0.

If you ask vaguelyWhen N=0, the AI might treat it as a special case and produce empty output instead of 0 minutes 0 seconds.

あなたのコード

実行しました

プレビュー

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

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

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