Advertisement
erfanul007

UVa 10683

Nov 30th, 2018
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4. long long int hh,h,modh,mm,m,modm,ss,s,mods,ms,ns,total;
  5. while(scanf("%2lld%2lld%2lld%2lld",&hh,&mm,&ss,&ms)!=EOF){
  6. total = ms*10+ss*1000+mm*60000+hh*3600000;
  7. h = total/8640000;
  8. total = total%8640000;
  9. m = total/86400;
  10. total = total%86400;
  11. s = total/864;
  12. total = total%864;
  13. ns = (total*100)/864;
  14. printf("%lld%02lld%02lld%02lld\n",h,m,s,ns);
  15. }
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement