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

Problem 55: Convert Seconds to Hours:Minutes:Seconds

An integer S (number of seconds) is given on one line. Convert it into the format hours:minutes:seconds and output it. Minutes and seconds should be zero-padded to 2 digits, while hours should be output as-is with no padding.

Constraints

0 ≤ S ≤ 100000

Input example 1

3661

Output example 1

1:01:01

Input example 2

59

Output example 2

0:00:59

What you'll train

Specify the output

What you get

  • Specify zero-padding conditions
  • Make the scope of digit alignment explicit
  • Specify the separator character

How to ask the AI

Clearly tell the AI the difference: minutes and seconds are zero-padded to 2 digits, but hours are output as-is without zero-padding.

If you ask vaguelyZero-padding gets applied to the hours part too, producing output that differs from what's expected.

あなたのコード

実行しました

プレビュー

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

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

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