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