Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int H, M;
- cin >> H >> M;
- int res = 0;
- for(int i = 1; i <= 10; i++) {
- M += 1;
- if(M == 60) {
- res += 2;
- M = 0;
- if(H == 23) {
- res += 2;
- H = 0;
- }
- else if(H == 9 or H == 19) {
- res += 2;
- H++;
- }
- else {
- res++;
- H++;
- }
- }
- else if(M % 10 == 0) {
- res += 2;
- }
- else {
- res++;
- }
- }
- cout << res << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment