A.关电脑

 1 #include<bits/stdc++.h>
 2 using namespace std;
 3 typedef long long LL;
 4 int T,h1,m1,s1,h2,m2,s2,t1,t2,ans;
 5 int main(){
 6     while(cin>>T){
 7         for(int cas=1;cas<=T;++cas){
 8             cin>>h1>>m1>>s1>>h2>>m2>>s2;
 9             t1=h1*3600+m1*60+s1,t2=h2*3600+m2*60+s2;
10             ans=t2-t1+(t1>=t2?24*3600:0);
11             cout<<"Case #"<<cas<<": "<<ans<<endl;
12         }
13     }
14     return 0;
15 }
View Code

相关文章:

  • 2022-12-23
  • 2021-11-15
  • 2022-12-23
  • 2022-03-09
  • 2022-02-19
  • 2021-11-01
  • 2021-12-01
猜你喜欢
  • 2021-05-17
  • 2019-05-16
  • 2022-01-13
  • 2021-10-18
  • 2022-12-23
  • 2021-01-31
  • 2022-12-23
相关资源
相似解决方案