fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n, t, total = 0;
  6. cin >> n;
  7.  
  8. for (int i = 1; i <= n; i++) {
  9. total = 0;
  10. cin >> t;
  11. total += t;
  12.  
  13. int hour = 8 + total / 60;
  14. int minute = total % 60;
  15.  
  16.  
  17. if (hour < 10) cout << "0";
  18. cout << hour << ":";
  19.  
  20.  
  21. if (minute < 10) cout << "0";
  22. cout << minute << endl;
  23. }
  24.  
  25. return 0;
  26. }
Success #stdin #stdout 0s 5332KB
stdin
3
5
10 
65
stdout
08:05
08:10
09:05