19 lines
383 B
C++
19 lines
383 B
C++
|
#include <iostream>
|
||
|
#include <cstring>
|
||
|
#include <algorithm>
|
||
|
using namespace std;
|
||
|
int main() {
|
||
|
int num = 0;
|
||
|
string str;
|
||
|
cin >> str;
|
||
|
if (atoi(str[0]) > 2) {
|
||
|
num++;
|
||
|
}
|
||
|
bool is_feb = atoi(str[1]) == 2;
|
||
|
int days = stoi(str[3].to_string()+str[4].to_string());
|
||
|
if (days > 30 || (is_feb && days > 28)) {
|
||
|
num++;
|
||
|
}
|
||
|
cout << num << endl;
|
||
|
}
|