Id and Ship — CodeChef Solution

chase2learn.com
Jun 20, 2021

--

Write a program that takes in a letterclass ID of a ship and display the equivalent string class description of the given ID. Use the table below.

Class ID Ship Class

B or b BattleShip

C or c Cruiser

D or d Destroyer

F or f Frigate

Input

The first line contains an integer T, the total number of testcases. Then T lines follow, each line contains a character.

Output

For each test case, display the Ship Class depending on ID, in a new line.

Constraints

  • 1 <= T <= 1000

Example

Input:

3 
B
c
D

Output:

BattleShip
Cruiser
Destroyer

Solution — Id and Ship — CodeChef Solution

https://www.chase2learn.com/2021/06/id-and-ship-codechef-solution.html

--

--

chase2learn.com

one place| Learn Gain Continue the Chase! Corner for CS, Software engineering, ML, AI, Software Developers, Programmers, CareerPath, Interviews questions.