Reset Password

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form





$10- $30


Problem Digital Time 12 The objective is to form t

Project Description:

<p style="font-size:11px;color:#1c1c1c;font-family:Verdana;background-color:#efefef;"><strong><span style="font-size:14px;color:#950000;">Problem : Digital Time 12</span></strong></p> <p style="font-size:11px;color:#1c1c1c;font-family:Verdana;background-color:#efefef;"><br>The objective is to form the maximum possible time in the HH:MM:SS format using any six of nine given single digits (not necessarily distinct)</p> <p style="font-size:11px;color:#1c1c1c;font-family:Verdana;background-color:#efefef;"><br>Given a set of nine single (not necessarily distinct) digits, say 0, 0, 1, 3, 4, 6, 7, 8, 9, it is possible to form many distinct times in a 12 hour time format HH:MM:SS, such as 10:36:40 or 01:39:46 by using each of the digits only once. The objective is to find the maximum possible valid time (00:00:01 to 12:00:00) that can be formed using some six of the nine digits exactly once. In this case, it is 10:49:38.</p> <div> <p style="font-size:11px;color:#1c1c1c;"><br><strong>Input</strong><br><br>A line consisting of a sequence of 9 (not necessarily distinct) single digits (any of 0-9) separated by commas. The sequence will be non-decreasing</p> <p style="font-size:11px;color:#1c1c1c;"><br><strong>Output </strong><br><br>The maximum possible time in a 12 hour clock (00:00:01 to 12:00:00) in a HH:MM:SS form that can be formed by using some six of the nine given digits (in any order) precisely once each. If no combination of any six digits will form a valid time, the output should be the word - Impossible</p> <p style="font-size:11px;color:#1c1c1c;"><br><strong>Example 1 </strong><br><br>Input:<br><br>0,0,1,1,3,5,6,7,7</p> <p style="font-size:11px;color:#1c1c1c;"><br>Output:<br><br>11:57:37<br><br>The maximum valid time in a 12 hour clock that can be formed using some six of the 9 digits precisely once is 11:57:37</p> <p style="font-size:11px;color:#1c1c1c;"><br><strong>Example 2 </strong></p> <p style="font-size:11px;color:#1c1c1c;"><br>Input:<br><br>3,3,3,3,3,3,3,3,3</p> <p style="font-size:11px;color:#1c1c1c;"><br>Output:<br><br>Impossible<br><br>No set of six digits from the input may be used to form a valid time.</p> </div>

About student:

0 rating(0 Reviews)

Tutors Bidding


Bid Price

5 (2 reviews)


4.9807692307692 (104 reviews)


0 (0 reviews)