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 }