1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-10 18:48:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/时钟指针的夹角 [angle-between-hands-of-a-clock].html
2022-03-29 12:43:11 +08:00

50 lines
1.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p>给你两个数&nbsp;<code>hour</code>&nbsp;&nbsp;<code>minutes</code>&nbsp;。请你返回在时钟上由给定时间的时针和分针组成的较小角的角度60 单位制)。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<p><img alt="" src="https://assets.leetcode-cn.com/aliyun-lc-upload/uploads/2020/02/08/sample_1_1673.png" style="height: 225px; width: 230px;"></p>
<pre><strong>输入:</strong>hour = 12, minutes = 30
<strong>输出:</strong>165
</pre>
<p><strong>示例 2</strong></p>
<p><img alt="" src="https://assets.leetcode-cn.com/aliyun-lc-upload/uploads/2020/02/08/sample_2_1673.png" style="height: 225px; width: 230px;"></p>
<pre><strong>输入:</strong>hour = 3, minutes = 30
<strong>输出;</strong>75
</pre>
<p><strong>示例 3</strong></p>
<p><strong><img alt="" src="https://assets.leetcode-cn.com/aliyun-lc-upload/uploads/2020/02/08/sample_3_1673.png" style="height: 231px; width: 230px;"></strong></p>
<pre><strong>输入:</strong>hour = 3, minutes = 15
<strong>输出:</strong>7.5
</pre>
<p><strong>示例 4</strong></p>
<pre><strong>输入:</strong>hour = 4, minutes = 50
<strong>输出:</strong>155
</pre>
<p><strong>示例 5</strong></p>
<pre><strong>输入:</strong>hour = 12, minutes = 0
<strong>输出:</strong>0
</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>1 &lt;= hour &lt;= 12</code></li>
<li><code>0 &lt;= minutes &lt;= 59</code></li>
<li>与标准答案误差在&nbsp;<code>10^-5</code>&nbsp;以内的结果都被视为正确结果。</li>
</ul>