Previous Next
0 / 11
Module DEMO-33-62DEMO-OOP-33

Seconds Breakdown

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Read a number of seconds and break it into hours, minutes, and seconds.

Input Format

Input is given as whitespace-separated tokens in this order:

  1. total seconds

Output Format

Print the exact report in this order:

  1. Hours
  2. Minutes
  3. Seconds

Sample Testcases

Submit runs every public testcase in this browser. Results and code never leave this device.

Sample #1
Public sample
3661
Hours: 1
Minutes: 1
Seconds: 1
Input: total seconds = 3661.
Key calculation(s): hours = 3661 / 3600 | remaining = 3661 % 3600 | "Hours: " + hours = "Hours: 1".
Output:
Hours: 1
Minutes: 1
Seconds: 1
Sample #2
Public sample
7322
Hours: 2
Minutes: 2
Seconds: 2
Input: total seconds = 7322.
Key calculation(s): hours = 7322 / 3600 | remaining = 7322 % 3600 | "Hours: " + hours = "Hours: 2".
Output:
Hours: 2
Minutes: 2
Seconds: 2

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
Editor settings