mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-13 11:21:42 +08:00
add leetcode problem-cn part1
This commit is contained in:
33
算法题(国内版)/problem (Chinese)/一周中的第几天 [day-of-the-week].html
Normal file
33
算法题(国内版)/problem (Chinese)/一周中的第几天 [day-of-the-week].html
Normal file
@@ -0,0 +1,33 @@
|
||||
<p>给你一个日期,请你设计一个算法来判断它是对应一周中的哪一天。</p>
|
||||
|
||||
<p>输入为三个整数:<code>day</code>、<code>month</code> 和 <code>year</code>,分别表示日、月、年。</p>
|
||||
|
||||
<p>您返回的结果必须是这几个值中的一个 <code>{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}</code>。</p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><strong>示例 1:</strong></p>
|
||||
|
||||
<pre><strong>输入:</strong>day = 31, month = 8, year = 2019
|
||||
<strong>输出:</strong>"Saturday"
|
||||
</pre>
|
||||
|
||||
<p><strong>示例 2:</strong></p>
|
||||
|
||||
<pre><strong>输入:</strong>day = 18, month = 7, year = 1999
|
||||
<strong>输出:</strong>"Sunday"
|
||||
</pre>
|
||||
|
||||
<p><strong>示例 3:</strong></p>
|
||||
|
||||
<pre><strong>输入:</strong>day = 15, month = 8, year = 1993
|
||||
<strong>输出:</strong>"Sunday"
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><strong>提示:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li>给出的日期一定是在 <code>1971</code> 到 <code>2100</code> 年之间的有效日期。</li>
|
||||
</ul>
|
Reference in New Issue
Block a user