1 solutions
-
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
Information
- ID
- 17047
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By