1 条题解

  • 0
    @ 2026-1-24 11:08:00
    
    #include <iostream>
    using namespace std;
    
    int main() {
        int h,m,s,k;
        cin>>h>>m>>s>>k;
        int t=h*3600+m*60+s+k;
        int nh=(t/3600)%24;
        if(nh==0)nh=24;
        int nm=(t%3600)/60;
        int ns=t%60;
        cout<<nh<<" "<<nm<<" "<<ns<<endl;
        return 0;
    }
    

    信息

    ID
    5093
    时间
    1000ms
    内存
    256MiB
    难度
    4
    标签
    (无)
    递交数
    51
    已通过
    23
    上传者