1 条题解
-
0
C++ :
#include <iostream> #include <cstdio> using namespace std; int main() { int n; cin>>n; int time=n; int h,m,s;//h时,m分,s秒 h=time/(60*60); time=time%(60*60); m=time/60; s=time%60; printf("%dS=%dH%dM%dS\n",n,h,m,s); return 0; }
Pascal :
var s,h,a,m,f:integer; begin read(a); h:=a div 3600; f:=a-h*3600; m:=f div 60; s:=f-m*60; write(a,'S=',h,'H',m,'M',s,'S'); end.
- 1
信息
- ID
- 790
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- (无)
- 标签
- 递交数
- 0
- 已通过
- 0
- 上传者