TCS Codevita

TCS CodeVita 2019 Questions

TCS Codevita 2019 Questions

What is TCS CodeVita?

Tata Consultancy Services Limited (TCS) conducts world largest coding contest TCS CodeVita once a year. 

The major objective of CodeVita contest is to recognize the passionate coders across the globe and make their programming skills more efficient with real-life computing practices.

 TCS organizes CodeVita to overcome this fear and enjoy writing computer code.
The main objective for the contest is to sharpen the contestants’ programming skills through some real-life computing practices.

In this post, we are going to see the TCS CodeVita 2019 Questions, TCS CodeVita eligibility criteria, Important Dates for TCS CodeVita 2019.

TCS CodeVita Eligibility :

Coders from institutes across India who are completing their academic course in 2020, 2021, 2022 and 2023 alone are eligible for this contest.
Registrations are invited from students in undergraduate (UG)/ postgraduate (PG) programs related to engineering/science background with any specialization.

TCS CodeVita 2019 Important Dates :

Events Of TCS CodeVita Season 8Important Dates
Contest Round 1 – Pre Qualifier Zonal Round
Starts FromStarted
Ends On13th July 2019 – 9:30 PM
Mode Of ContestTakes Place Online
Contest Round 2 – Qualifier Round
Starts From8th December 2019 – 3:30 PM
Ends On10th December 2019 – 3:30 PM
Mode Of ContestTakes Place Online
Contest Round 3 – Grand Finale
Starts From26th February 2019 – 9:30 PM
Ends On26th February 2019 – 12:30 PM
Mode Of ContestTakes Place At The Venue

TCS CodeVita 2019 Questions :

Now, let’s see the TCS CodeVita 2019 Questions :
1. Clock Angel :
Problem Description 

There are 360 Longitudes on the Earth, which are equidistant vertical imaginary lines drawn on the Earth, separated by 1 degree each from center of the Earth. Period of the rotation of the Earth on its axis is 24 hours.

All countries have their own official times and hence time zones.

UTC is universal time coordinate which passes through 0 (Zero degree) longitude.

Time at a particular location on Earth can be calculated using period of the rotation of Earth and longitude of that particular location. For example, Indian time zone IST (Indian standard Time) is located at 82.5° E


Hence, Indian time can be calculated as below:-

IST = UTC + (24/360)*82.5 = UTC + 5:30Hrs
Now suppose we changed period of rotation of the earth using some imaginary power, this will change the time at every longitude on the earth.
Calculate the smallest angle between hour and minute hand of the clock , which shows the difference of time at a particular longitude and the time at UTC i.e. we have to take smaller of the two angle formed between hour and minute hand.
Constraints :

To show the time difference on clock, 12-hour clock (as shown below) shall be used, irrespective of period of the earth’s rotation, for this question only.

Input Format :

1. Period of the earth’s rotation in Hours (Integer only)

2. Value of Longitude up to 2 place of decimal

Output :

Smallest angle between hour and minute hand of the clock, which shows the difference between time at a particular longitude and time at UTC, up to 2 decimal places.

Test Case :

Example 1







If period of rotation of earth is 24 hours then time at 82.5 degree longitude will be (24/360)*82.50 = 5:30 and minimum angle at this time between minute and hour hand will be 15 degree.

Example 2







If period of rotation of earth is 12 hours then time at 360 degree longitude will be (12/360)*360 = 12:00 and minimum angle at this time between minute and hour hand will be 0 degree.

Leave a Reply

Your email address will not be published. Required fields are marked *