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

Campus Map Legend

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Read building, floor, room, and extension values, then print a campus map legend.

Input Format

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

  1. building code
  2. floor number
  3. room code
  4. extension number

Output Format

Print the exact report in this order:

  1. Location
  2. Extension

Sample Testcases

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

Sample #1
Public sample
b
2
r5
110
Location: B-2-R5
Extension: 110
Input: building code = "b", floor number = 2, room code = "r5", extension number = 110.
Key calculation(s): location = "b".toUpperCase() + "-" + 2 + "-" + "r5".toUpperCase() | "Location: " + location = "Location: B-2-R5" | "Extension: " + 110 = "Extension: 110".
Output:
Location: B-2-R5
Extension: 110
Sample #2
Public sample
c
1
a9
240
Location: C-1-A9
Extension: 240
Input: building code = "c", floor number = 1, room code = "a9", extension number = 240.
Key calculation(s): location = "c".toUpperCase() + "-" + 1 + "-" + "a9".toUpperCase() | "Location: " + location = "Location: C-1-A9" | "Extension: " + 240 = "Extension: 240".
Output:
Location: C-1-A9
Extension: 240

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