6 条题解
-
0
Guest
- 1
信息
- ID
- 15
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 1
- 标签
- 递交数
- 181
- 已通过
- 128
- 上传者
根据 3600×h+60×m+s 推即可。
不开 long long
见祖宗
#include<bits/stdc++.h>
using namespace std;
int main(){
long long h,m,s;
cin>>h>>m>>s;
cout<<1ll*h*3600+m*60+s;//1ll表示转化 long long
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main()
{ int h,m,s,t;
cin>>h>>m>>s;
t=3600h+60m+s;
cout<<t;
return 0;
}
#include<bits/stdc++.h> using namespace std; int main() { int h,m,s,t; cin>>s; h=3600s; m=60s; t=h+m+s; cout<<t<<endl; return 0; }
注册一个 PYYG 通用账户,您就可以在我们提供的所有在线评测服务上提交代码、参与讨论。