TIMECONV - Editorial

PROBLEM LINK:
Practice

Author: Rupanjan Hari

Tester: Rupanjan Hari

DIFFICULTY
: Easy

PREREQUISITES
: Math

QUICK EXPLANATION

Convert the 12 hour format to 24 hour format time.

EXPLANATION

Receive the time in a single line in the format hh:mm:ssAM.

Manipulate the hh as needed depending on the AM or PM mark.

i.e. (hh = hh + 12) if it is PM otherwise keep it the same.

SOLUTION:
click here to see the solution