Computer Science, asked by agmanmadhrao304, 9 months ago

equivalent prime hours program

Answers

Answered by za6715
7

Answer:

</p><p>&lt;!DOCTYPE html&gt;</p><p></p><p>&lt;html lang="en"&gt;</p><p></p><p>&lt;head&gt;</p><p></p><p>&lt;title&gt;Cat&lt;/title&gt;</p><p></p><p>&lt;/head&gt;</p><p></p><p>&lt;body&gt;</p><p></p><p>&lt;div id="cat"&gt;</p><p></p><p>&lt;div id="ears"&gt;</p><p></p><p>&lt;div class="ear"&gt;&lt;/div&gt;</p><p></p><p>&lt;div class="ear"&gt;&lt;/div&gt;</p><p></p><p>&lt;/div&gt;</p><p></p><p>&lt;div id="head"&gt;</p><p></p><p>&lt;div id="eyes"&gt;</p><p></p><p>&lt;div class="eye"&gt;</p><p></p><p>&lt;div class="pupil"&gt;</p><p></p><p>&lt;div class="pupil_ref"&gt;&lt;/div&gt;</p><p></p><p>&lt;/div&gt;</p><p></p><p>&lt;/div&gt;</p><p></p><p>&lt;div class="eye"&gt;</p><p></p><p>&lt;div class="pupil"&gt;</p><p></p><p>&lt;div class="pupil_ref"&gt;&lt;/div&gt;</p><p></p><p>&lt;/div&gt;</p><p></p><p>&lt;/div&gt;</p><p></p><p>&lt;/div&gt;</p><p></p><p>&lt;div id="nose"&gt;&lt;/div&gt;</p><p></p><p>&lt;div id="baffi_dx"&gt;</p><p></p><p>&lt;div class="baffo"&gt;&lt;/div&gt;</p><p></p><p>&lt;div class="baffo"&gt;&lt;/div&gt;</p><p></p><p>&lt;div class="baffo"&gt;&lt;/div&gt;</p><p></p><p>&lt;/div&gt;</p><p></p><p>&lt;div id="baffi_sx"&gt;</p><p></p><p>&lt;div class="baffo"&gt;&lt;/div&gt;</p><p></p><p>&lt;div class="baffo"&gt;&lt;/div&gt;</p><p></p><p>&lt;div class="baffo"&gt;&lt;/div&gt;</p><p></p><p>&lt;/div&gt;</p><p></p><p>&lt;/div&gt;</p><p></p><p>&lt;/div&gt;</p><p></p><p>&lt;style&gt;</p><p></p><p>@keyframes an-pupils {</p><p></p><p>from {</p><p></p><p>left: 60px;</p><p></p><p>}</p><p></p><p>to {</p><p></p><p>left: 0px;</p><p></p><p>}</p><p></p><p>}</p><p></p><p>@keyframes an-ears {</p><p></p><p>from {</p><p></p><p>top:0;</p><p></p><p>}</p><p></p><p>to {</p><p></p><p>top:25px;</p><p></p><p>}</p><p></p><p>}</p><p></p><p>body {</p><p></p><p>background-color:#0A7E8C;</p><p></p><p>}</p><p></p><p>#cat {</p><p></p><p>width: 480px;</p><p></p><p>margin:20px auto;</p><p></p><p>}</p><p></p><p>#head {</p><p></p><p>width: 400px;</p><p></p><p>height: 370px;</p><p></p><p>background-color: #171717;</p><p></p><p>border-radius: 50%;</p><p></p><p>margin: auto;</p><p></p><p>}</p><p></p><p>#ears {</p><p></p><p>height: 65px;</p><p></p><p>position: relative;</p><p></p><p>left: 35px;</p><p></p><p>animation-name: an-ears;</p><p></p><p>animation-duration: 1s;</p><p></p><p>animation-iteration-count: infinite;</p><p></p><p>animation-direction: alternate-reverse;</p><p></p><p>}</p><p></p><p>.ear{</p><p></p><p>width: 0;</p><p></p><p>height: 0;</p><p></p><p>border-left: 90px solid transparent;</p><p></p><p>border-right: 90px solid transparent;</p><p></p><p>border-bottom: 160px solid #171717;</p><p></p><p>font-size: 0;</p><p></p><p>line-height: 0;</p><p></p><p>float: left;</p><p></p><p>margin-right: 60px;</p><p></p><p>-ms-transform: rotate(35deg);</p><p></p><p>-webkit-transform: rotate(35deg);</p><p></p><p>transform: rotate(35deg);</p><p></p><p>}</p><p></p><p>.ear:first-child {</p><p></p><p>-ms-transform: rotate(-35deg);</p><p></p><p>-webkit-transform: rotate(-35deg);</p><p></p><p>transform: rotate(-35deg);</p><p></p><p>}</p><p></p><p>#eyes {</p><p></p><p>clear: both;</p><p></p><p>width: 350px;</p><p></p><p>position: relative;</p><p></p><p>top: 25px;</p><p></p><p>left: 53px;</p><p></p><p>}</p><p></p><p>.eye {</p><p></p><p>width: 120px;</p><p></p><p>height: 120px;</p><p></p><p>background-color: #FFFFFF;</p><p></p><p>border-radius: 50%;</p><p></p><p>float: left;</p><p></p><p>}</p><p></p><p>.eye:first-child {</p><p></p><p>margin-right: 50px;</p><p></p><p>}</p><p></p><p>.pupil {</p><p></p><p>position: relative;</p><p></p><p>top:40px;</p><p></p><p>background-color: #000000;</p><p></p><p>border-radius: 50%;</p><p></p><p>width: 80px;</p><p></p><p>height: 80px;</p><p></p><p>animation-name: an-pupils;</p><p></p><p>animation-duration: 1s;</p><p></p><p>animation-iteration-count: infinite;</p><p></p><p>animation-direction: alternate-reverse;</p><p></p><p>}</p><p></p><p>.pupil_ref {</p><p></p><p>background-color: #FFFFFF;</p><p></p><p>border-radius: 45%;</p><p></p><p>width: 30px;</p><p></p><p>height: 30px;</p><p></p><p>position: relative;</p><p></p><p>top: 40px;</p><p></p><p>left: 10px;</p><p></p><p>}</p><p></p><p>#nose {</p><p></p><p>width: 45px;</p><p></p><p>height: 30px;</p><p></p><p>border-radius: 50%;</p><p></p><p>background-color: #FFFFFF;</p><p></p><p>position: relative;</p><p></p><p>top: 160px;</p><p></p><p>left: 170px;</p><p></p><p>}</p><p></p><p>#baffi_sx {</p><p></p><p>position: relative;</p><p></p><p>left: -100px;</p><p></p><p>top: 85px;</p><p></p><p>-ms-transform: rotate(10deg);</p><p></p><p>-webkit-transform: rotate(10deg);</p><p></p><p>transform: rotate(10deg);</p><p></p><p>}</p><p></p><p>#baffi_dx {</p><p></p><p>position: relative;</p><p></p><p>left: 223px;</p><p></p><p>top: 96px;</p><p></p><p>-ms-transform: rotate(-10deg);</p><p></p><p>-webkit-transform: rotate(-10deg);</p><p></p><p>transform: rotate(-10deg);</p><p></p><p>}</p><p></p><p>.baffo{</p><p></p><p>width:260px;</p><p></p><p>height:5px;</p><p></p><p>border:solid 3px #000;</p><p></p><p>border-color:#000 transparent transparent transparent;</p><p></p><p>border-radius: 60%/30px 30px 0 0;</p><p></p><p>}</p><p></p><p>&lt;/style&gt;</p><p></p><p>&lt;/bold&gt;</p><p></p><p>&lt;/html&gt;

Answered by cskooo7
2

Explanation:

Prime Time Again Problem Description Here on earth, our 24-hour day is composed of two parts, each of 12 hours. Each hour in each part has a corresponding hour in the other part separated by 12 hours: the hour essentially measures the duration since the start of the day part. For example, 1 hour in the first part of the day is equivalent to 13, which is 1 hour into the second part of the day. Now, consider the equivalent hours that are both prime numbers. We have 3 such instances for a 24-hour 2-part day: 5~17 7~19 11~23 Accept two natural numbers D, P >1 corresponding respectively to number of hours per day and number of parts in a day separated by a space. D should be divisible by P, meaning that the number of hours per part (D/P) should be a natural number. Calculate the number of instances of equivalent prime hours. Output zero if there is no such instance. Note that we require each equivalent hour in each part in a day to be a prime number. Example: Input: 24 2 Output: 3 (We have 3 instances of equivalent prime hours: 5~17, 7~19 and 11~23.) Constraints 10 <= D < 500 2 <= P < 50 Input Single line consists of two space separated integers, D and P corresponding to number of hours per day and number of parts in a day respectively Output Output must be a single number, corresponding to the number of instances of equivalent prime number, as described above Time Limit 1 Examples Example 1 Input 36 3 Output 2 Explanation In the given test case D = 36 and P = 3 Duration of each day part = 12 2~14~X 3~15~X 5~17~29 - instance of equivalent prime hours 7~19~31 - instance of equivalent prime hours 11~23~X Hence the answers is 2. Example 2 Input 49 7 Output 0 Explanation Duration of each day part = 7 2~9~X~23~X~37~X 3~X~17~X~31~X~X 5~X~19~X~X~X~47 7~X~X~X~X~X~X

5 Thanks + follow = inbox ❤❤❤❤

Similar questions