2 solutions

  • -1
    @ 2024-12-17 20:31:43
    #include<bits/stdc++.h> 
    using namespace std;
    int main()
    {
    	int a,b;
    	cin>>a>>b;
    	if(a>=b)
    	{
    		b=b+24;
    	}
    	cout<<b-a;
    	return 0;
    }
    
    • -3
      @ 2024-10-20 11:23:20
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
      	int a,b;
      	cin>>a>>b;
      	if(a>=b)
      	{
      		b=b+24;
      	}
      	cout<<b-a;
      	return 0;
      }
      • 1

      Information

      ID
      24
      Time
      1000ms
      Memory
      256MiB
      Difficulty
      1
      Tags
      (None)
      # Submissions
      159
      Accepted
      64
      Uploaded By