6 条题解

  • 0
    @ 2023-8-31 22:24:44
    #include <bits/stdc++.h>
    using namespace std;
    int a,b,c,d,sum1,sum2;
    int main()
    {
        cin>>a>>b>>c>>d;
        sum1=a*60+b,sum2=c*60+d;
        sum2-=sum1;
        cout<<sum2/60<<" "<<sum2%60;
        return 0;
    }
    
    • 0
      @ 2023-8-23 12:13:59

      过辣!

      这题其实就是简单的借位

          long long a,b,c,d;
          cin>>a>>b>>c>>d;
          if (b>d)
          {
              c--;
              d+=60;
          }
          d-=b;
          c-=a;
          cout<<c<<" "<<d;
      
      • 0
        @ 2023-4-26 20:07:39
        #include<bits/stdc++.h>
        using namespace std;
        
        int main()
        {
        	int a,b,c,d,s;
        	cin>>a>>b>>c>>d;
        	s=(c*60+d)-(a*60+b);   //小明游泳的时间 
        	cout<<s/60<<" "<<s%60;   //算出时间 
        	
        	return 0;
        }
        
        • 0
          @ 2022-11-9 13:31:28

          号没了

          #include <bits/stdc++.h>
          using namespace std;
          int main()
          {
              int a,b,c,d,e,f,g;
              cin >> a >> b >> c >> d;
              e=a*60+b;
              f=c*60+d;
              g=f-e;
              cout << g/60 << " " << g%60;
          }
          
          • -1
            @ 2024-2-15 17:18:00

            小明:“是飞行时间。” 装13让你飞起来

            #include<bits/stdc++.h>
            using namespace std;
            int main()
            {
            	int a,b,c,d,s;
            	cin>>a>>b>>c>>d;
            	s=(c*60+d)-(a*60+b);//游泳时间
            	cout<<s/60<<" "<<s%60;//算出时间
            	return 0;
            }
            

            摔s了

            • -1
              @ 2023-9-30 20:39:57
              #include<bits/stdc++.h>
              using namespace std;
              int a,b,c,d,sum,sum1,sum2;
              int main()
              {
                  cin>>a>>b>>c>>d;
                  sum1=a*60+b;
                  sum2=c*60+d;
                  sum=sum2-sum1;
                  cout<<sum/60<<" "<<sum%60;
                  return 0;
              }
              
              • 1

              信息

              ID
              459
              时间
              1000ms
              内存
              32MiB
              难度
              4
              标签
              递交数
              370
              已通过
              164
              上传者