1185. Day of the Week Easy

@problem@discussion
#Math



1/**
2 * [1185] Day of the Week
3 *
4 * Given a date, return the corresponding day of the week for that date.
5 * The input is given as three integers representing the day, month and year respectively.
6 * Return the answer as one of the following values {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}.
7 *  
8 * Example 1:
9 * 
10 * Input: day = 31, month = 8, year = 2019
11 * Output: "Saturday"
12 * 
13 * Example 2:
14 * 
15 * Input: day = 18, month = 7, year = 1999
16 * Output: "Sunday"
17 * 
18 * Example 3:
19 * 
20 * Input: day = 15, month = 8, year = 1993
21 * Output: "Sunday"
22 * 
23 *  
24 * Constraints:
25 * 
26 * 	The given dates are valid dates between the years 1971 and 2100.
27 * 
28 */
29pub struct Solution {}
30
31// problem: https://leetcode.com/problems/day-of-the-week/
32// discuss: https://leetcode.com/problems/day-of-the-week/discuss/?currentPage=1&orderBy=most_votes&query=
33
34// submission codes start here
35
36impl Solution {
37    pub fn day_of_the_week(day: i32, month: i32, year: i32) -> String {
38        String::new()
39    }
40}
41
42// submission codes end
43
44#[cfg(test)]
45mod tests {
46    use super::*;
47
48    #[test]
49    fn test_1185() {
50    }
51}
52


Back
© 2025 bowen.ge All Rights Reserved.