fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int x, y;
  6. cin >> x >> y;
  7. y += 42;
  8. if (y >= 60) {
  9. x += y / 60;
  10. y = y % 60;
  11. }
  12. if (x >= 24) {
  13. x = x % 24;
  14. }
  15. cout << x << " " << y << endl;
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0.01s 5312KB
stdin
10
20
stdout
11 2