Team Ai
Datasetpublic

prithivMLmods/Coder-Stat

Coder-Stat Dataset Overview The Coder-Stat dataset is a collection of programming-related data, including problem IDs, programming languages, original statuses, and source code snippets. This dataset is designed to assist in the analysis of coding patterns, error types, and performance metrics. Dataset Details Modalities Tabular: The dataset is structured in a tabular format. Text: Contains text data, including source code snippets.… See the full description on the dataset page: https://huggingface.co/datasets/prithivMLmods/Coder-Stat.

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
3likes139downloads
p00917.html116 linesDownload Raw Back to problem_descriptions
1 2<H1><font color="#000">Problem D: </font>Clock Hands</H1>3 4<p>5We have an analog clock whose three hands (the second hand, the <i>minute</i> hand and the <i>hour</i> hand) rotate quite smoothly. You can measure two angles between the second hand and two other hands.6</p>7 8<p>9Write a program to find the time at which "No two hands overlap each other" and "Two angles between the second hand and two other hands are equal" for the first time on or after a given time.10</p>11 12<center>13<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE2_clockHands1" style="aling:center;width:480px"><br/>14<span>15Figure D.1. Angles between the second hand and two other hands16</span>17 18</center>19<br/>20 21<p>22Clocks are not limited to 12-hour clocks. The hour hand of an <var>H</var>-hour clock goes around once in <var>H</var> hours. The minute hand still goes around once every hour, and the second hand goes around once every minute. At 0:0:0 (midnight), all the hands are at the upright position.23</p>24 25 26<H2>Input</H2>27 28<p>29The input consists of multiple datasets. Each of the dataset has four integers <var>H</var>, <var>h</var>, <var>m</var> and <var>s</var> in one line, separated by a space. <var>H</var> means that the clock is an <var>H</var>-hour clock. <var>h</var>, <var>m</var> and <var>s</var> mean hour, minute and second of the specified time, respectively.30</p>31<p>32You may assume 2 &le; <var>H</var> &le; 100, 0 &le; <var>h</var> &lt; <var>H</var>, 0 &le; <var>m</var> &lt; 60, and 0 &le; <var>s</var> &lt; 60.33</p>34 35<p>36The end of the input is indicated by a line containing four zeros.37</p>38 39<center>40<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE2_clockHands2" style="aling:center;width:480px"><br/>41<span>42Figure D.2. Examples of H-hour clock (6-hour clock and 15-hour clock)43</span>44</center>45 46<H2>Output</H2>47 48<p>49Output the time T at which "No two hands overlap each other" and "Two angles between the second hand and two other hands are equal" for the first time on and after the specified time.50</p>51 52<p>53For <var>T</var> being <var>h<sub>o</sub></var>:<var>m<sub>o</sub></var>:<var>s<sub>o</sub></var> (<var>s<sub>o</sub></var> seconds past <var>m<sub>o</sub></var> minutes past <var>h<sub>o</sub></var> o'clock), output four non-negative integers <var>h<sub>o</sub></var>, <var>m<sub>o</sub></var>, <var>n</var>, and <var>d</var> in one line, separated by a space, where <var>n</var>/<var>d</var> is the irreducible fraction representing <var>s<sub>o</sub></var>. For integer <var>s<sub>o</sub></var> including 0, let <var>d</var> be 1.54</p>55 56<p>57The time should be expressed in the remainder of <var>H</var> hours. In other words, one second after58(<var>H</var> − 1):59:59 is 0:0:0, not <var>H</var>:0:0.59</p>60 61<H2>Sample Input</H2>62<pre>6312 0 0 06412 11 59 596512 1 56 06612 1 56 36712 1 56 346812 3 9 436912 3 10 147012 7 17 587112 7 18 287212 7 23 07312 7 23 31742 0 38 29752 0 39 0762 0 39 30772 1 6 20782 1 20 1792 1 20 31803 2 15 0813 2 59 30824 0 28 48835 1 5 40845 1 6 10855 1 7 418611 0 55 0870 0 0 088</pre>89 90<H2>Output for the Sample Input</H2>91<pre>920 0 43200 1427930 0 43200 1427941 56 4080 1427951 56 47280 1427961 57 4860 1427973 10 18600 1427983 10 61800 1427997 18 39240 14271007 18 82440 14271017 23 43140 14271027 24 720 14271030 38 4680 791040 39 2340 791050 40 0 11061 6 3960 791071 20 2400 791081 21 60 791092 15 0 11100 0 2700 891110 28 48 11121 6 320 331131 6 40 11141 8 120 111150 55 0 1116</pre>