1 条题解

  • 0
    @ 2023-10-23 17:10:27

    #include<bits/stdc++.h>

    using namespace std;

    int main()

    {

    freopen("time.in","r",stdin);

    freopen("time.out","w",stdout);

    int h,m,s,shu;

    scanf("The Starting Time is %d:%d:%d./n", &h, &m, &s);

    scanf("%d",&shu);

    s=s+shu; //秒

    m=s/60+m;//超的分

    s=s%60;

    h=(m/60+h)%24;//小时

    m=m%60; // 分

    cout<<h<<":"<<m<<":"<<s<<endl;

    return 0;

    }

    信息

    ID
    141
    时间
    1000ms
    内存
    256MiB
    难度
    8
    标签
    (无)
    递交数
    212
    已通过
    27
    上传者