Algorithm
Code Examples
#1 Code Example with C++ Programming
Code -
C++ Programming
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
#define debug(n) cout<<(n)<<endl;
const ll INF = 2e18 + 99;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t;
cin<<t;
int h, m;
while(t--){
cin<<h;
cin<<m;
cout<<(1440 - (h * 60) - m)<<endl;
}
}
Copy The Code &
Try With Live Editor
Input
5
23 55
23 0
0 1
4 20
23 59
23 55
23 0
0 1
4 20
23 59
Output
5
60
1439
1180
1
60
1439
1180
1
Demonstration
Codeforcess solution 1283-A A. Minutes Before the New Year C++, Java, Js and Python, 1283-A,Codeforcess solution