mirror of
https://github.com/xlucn/PAT.git
synced 2026-11-04 00:38:13 +08:00
16 lines
1.9 KiB
HTML
16 lines
1.9 KiB
HTML
Dating
|
|
<div class="ques-view"><p>Sherlock Holmes received a note with some strange strings: <code>Let's date! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm</code>. It took him only a minute to figure out that those strange strings are actually referring to the coded time <code>Thursday 14:04</code> -- since the first common capital English letter (case sensitive) shared by the first two strings is the 4th capital letter <code>D</code>, representing the 4th day in a week; the second common character is the 5th capital letter <code>E</code>, representing the 14th hour (hence the hours from 0 to 23 in a day are represented by the numbers from 0 to 9 and the capital letters from <code>A</code> to <code>N</code>, respectively); and the English letter shared by the last two strings is <code>s</code> at the 4th position, representing the 4th minute. Now given two pairs of strings, you are supposed to help Sherlock decode the dating time.</p>
|
|
<h3 id="input-specification-">Input Specification:</h3>
|
|
<p>Each input file contains one test case. Each case gives 4 non-empty strings of no more than 60 characters without white space in 4 lines.</p>
|
|
<h3 id="output-specification-">Output Specification:</h3>
|
|
<p>For each test case, print the decoded time in one line, in the format <code>DAY HH:MM</code>, where <code>DAY</code> is a 3-character abbreviation for the days in a week -- that is, <code>MON</code> for Monday, <code>TUE</code> for Tuesday, <code>WED</code> for Wednesday, <code>THU</code> for Thursday, <code>FRI</code> for Friday, <code>SAT</code> for Saturday, and <code>SUN</code> for Sunday. It is guaranteed that the result is unique for each case.</p>
|
|
<h3 id="sample-input-">Sample Input:</h3>
|
|
<pre><code class="lang-in">3485djDkxh4hhGE
|
|
2984akDfkkkkggEdsb
|
|
s&hgsfdk
|
|
d&Hyscvnm
|
|
</code></pre>
|
|
<h3 id="sample-output-">Sample Output:</h3>
|
|
<pre><code class="lang-out">THU 14:04
|
|
</code></pre>
|
|
</div> |