2 条题解
-
1
周钰宸 (Corey_ZYC) LV 7 @ 2025-06-27 19:29:42
#include<bits/stdc++.h>
using namespace std;
int main()
{
int h,m,s;
cin>>h>>m>>s;
int k;
cin>>k;
int now=h*60*60+m*60+s;
now+=k;
int hh=now/3600;
now%=3600;
int mm=now/60;
now%=60;
cout<<hh<<" "<<mm<<" "<<now<<endl;
return 0;
} -
02024-09-06 16:46:05@
#include<bits/stdc++.h>
using namespace std;
int main()
{
int h,m,s,k;
cin>>h>>m>>s>>k;
s+=k;
m+=s/60;
s=s%60;
h+=m/60;
m=m%60;
cout<<h<<" "<<m<<" "<<s;
return 0;
}
- 1
信息
- ID
- 2771
- 难度
- 8
- 分类
- (无)
- 标签
- 递交数
- 283
- 已通过
- 34
- 通过率
- 12%
- 上传者