6 条题解

  • 2

    思路

    根据 3600×h+60×m+s3600 \times h + 60 \times m +s 推即可。 不开 long long 见祖宗

    code

    #include<bits/stdc++.h>
    using namespace std;
    int main(){
       long long h,m,s;
       cin>>h>>m>>s;
       cout<<1ll*h*3600+m*60+s;//1ll表示转化 long long
       return 0;
    }
    
    • 1
      @ 2024-1-28 11:50:01
      #include<bits/stdc++.h> 
      using namespace std;int main(){long long int a,b,c; cin>>a>>b>>c; cout<<a*3600+b*60+c; return 0; }
      

      两行代码就够了

      
      
      • 1
        @ 2023-12-24 16:58:56

        #include<bits/stdc++.h> using namespace std; int main() { int h,m,s,t; cin>>h>>m>>s; t=3600h+60m+s; cout<<t; return 0; }image

        • 0

          #include<bits/stdc++.h> using namespace std; int main() { int h,m,s,t; cin>>s; h=3600s; m=60s; t=h+m+s; cout<<t<<endl; return 0; }

          • 0
            @ 2024-11-6 13:07:41

            #include<bits/stdc++.h> using namespace std; int main() { int a,b,c,d,e,f; cin>>a>>b>>c; d=a6060; e=b*60; f=c+d+e; cout<<fixed<<setprecision(0)<<f; return 0; }

            • -2
              @ 2023-12-23 13:52:45

              #include<iostream> using namespace std; int main() { int h,m,s,a,b,c,d; cin>>h>>m>>s; a=h3600; b=m60; c=s; d=a+b+c; cout<<d; return 0; }

              • 1

              信息

              ID
              15
              时间
              1000ms
              内存
              256MiB
              难度
              1
              标签
              递交数
              181
              已通过
              128
              上传者