题解 | Letter Song ~ 致十年后的我们

Letter Song ~ 致十年后的我们

https://www.nowcoder.com/practice/34ad18b42bf640b8b93855936c24deae

#include <cstdlib>
#include <iostream>
#include <string>
using namespace std;

int main() {
    string a;
    if(!(getline(cin, a))) return 0;
    cout << atoi(a.substr(0,4).c_str()) + 10
    << "-"
    << a.substr(5,2) 
    << "-"
    << a.substr(8,2) <<endl;
    
}
// 64 位输出请用 printf("%lld")

全部评论

相关推荐

03-31 21:47
东南大学 C++
彭于晏前来求offe...:吓晕了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务