[Offer收割]编程练习赛41 register

Ended

Participants:163

Verdict:Accepted
Score:100 / 100
Submitted:2017-12-24 12:49:22

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// hiho_2017_09_08.cpp : 
//
#include <iostream>
#include <string>
#include <map>
#include <set>
#include <vector>
#include <stdio.h>
#include <math.h>
#include <string.h>
using namespace std;
int get_days(int m, int d) {
    int ans = d;
    m--;
    switch (m)
    {
    case 11: ans += 30;
    case 10: ans += 31;
    case 9: ans += 30;
    case 8: ans += 31;
    case 7: ans += 31;
    case 6: ans += 30;
    case 5: ans += 31;
    case 4: ans += 30;
    case 3: ans += 31;
    case 2: ans += 29;
    case 1: ans += 31;
    }
    return ans;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX