Previous Next
0 / 13
Module DEMO-33-61DEMO-OOP-33

Timetable Block

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Read two day-room pairs and print a two-line timetable block.

Input Format

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

  1. first day
  2. first room
  3. second day
  4. second room

Output Format

Print the exact report in this order:

  1. Morning
  2. Evening

Sample Testcases

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

Sample #1
Public sample
Sun
A1
Tue
B2
Morning: Sun - A1
Evening: Tue - B2
Input: first day = "Sun", first room = "A1", second day = "Tue", second room = "B2".
Key calculation(s): "Morning: " + "Sun" + " - " + "A1" = "Morning: Sun - A1" | "Evening: " + "Tue" + " - " + "B2" = "Evening: Tue - B2".
Output:
Morning: Sun - A1
Evening: Tue - B2
Sample #2
Public sample
Mon
L3
Wed
R4
Morning: Mon - L3
Evening: Wed - R4
Input: first day = "Mon", first room = "L3", second day = "Wed", second room = "R4".
Key calculation(s): "Morning: " + "Mon" + " - " + "L3" = "Morning: Mon - L3" | "Evening: " + "Wed" + " - " + "R4" = "Evening: Wed - R4".
Output:
Morning: Mon - L3
Evening: Wed - R4

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