5 solutions

  • 1
    @ 2026-2-23 11:22:27
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    	int sh,sm,eh,em;
    	cin>>sh>>sm>>eh>>em;
    	int t = 0;
    	t = (eh-sh)*60+em-sm;
    	cout<<t;
    	return 0;
    }
    
    
    • 0
      @ 2026-1-27 19:31:43
      #include <iostream>
      using namespace std;
      int main(){
          int hour,min,end_hour,end_min;    
          cin>>hour>>min>>end_hour>>end_min;
          int total=hour*60+min;
          int end_total=end_hour*60+end_min;  
          int minutes=end_total-total;
          cout<<minutes<<endl;   
          return 0;
      }
      
      • -1
        @ 2026-2-22 20:31:51

        #include using namespace std; int main() { int t,i,m,e; int x=0,y=0; cin>>t>>i>>m>>e; x=(m-t)*60; y=e-i; cout<<x+y;

        }

        • -1
          @ 2026-1-25 11:51:09
          #include<bits/stdc++.h>
          using namespace std;
          int main()
          {
              int a,b,c,d,h,m,s=0;
              cin>>a>>b>>c>>d;
              if(d>=b)
              {
                  h=c-a;
                  m=d-b;
              }
              else
              {
                  h=c-a;
                  m=60-(b-d);
                  h--;
              }
              s+=h*60;
              s+=m;
              cout<<s;
          }
          
          • -2
            @ 2025-11-27 11:54:18

            C++ :

            #include<bits/stdc++.h>
            using namespace std;
            int main(){
            	int sh,sm,eh,em;
            	cin>>sh>>sm>>eh>>em;
            	int t = 0;
            	t = (eh-sh)*60+em-sm;
            	cout<<t;
            	return 0;
            }
            
            • 1

            Information

            ID
            19
            Time
            1000ms
            Memory
            128MiB
            Difficulty
            5
            Tags
            # Submissions
            26
            Accepted
            14
            Uploaded By