L1-042 日期格式化 分數 5

Frodnx發表於2024-08-03
// 1'39"
#include <iostream>
using namespace std;
int main()
{
    string s;
    cin >> s;
    for(int i = 6; i <= 9; ++ i)
        cout << s[i];
    cout << "-";
    for(int i = 0; i <= 1; ++ i)
        cout << s[i];
    cout << "-";
    for(int i = 3; i <= 4; ++ i)
        cout << s[i];
    return 0;
}

相關文章