#include #define fastIO (cin.tie(0), cout.tie(0), ios::sync_with_stdio(false)) using namespace std; tuple dateToInt(string date) { return { stoi(date.substr(0, 4)), stoi(date.substr(5, 2)), stoi(date.substr(8, 2)), }; } void ans(int year, int month, int day) { int days[13] { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, }; // is leap year? if((year % 400 == 0) || (year % 4 == 0 && year % 100 != 0)) { days[2] += 1; } day += 2; if(day > days[month]) { day -= days[month]; month += 1; if(month > 12) { year += 1; month = 1; } } string s_year{""}, s_month{"0"}, s_day{"0"}; s_year = to_string(year); if(month < 10) s_month += to_string(month); else s_month = to_string(month); if(day < 10) s_day += to_string(day); else s_day = to_string(day); cout << s_year << "/" << s_month << "/" << s_day << '\n'; } int main() { fastIO; string date; cin >> date; int year, month, day; tie(year, month, day) = dateToInt(date); ans(year, month, day); return 0; }