Advertisement
Dang_Quan_10_Tin

TG HSGHN L9 2022-2023

Jan 12th, 2023
882
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4. using ll = long long;
  5.  
  6. constexpr int N = 1e5 + 5;
  7. int t;
  8.  
  9. void Read()
  10. {
  11.     cin >> t;
  12. }
  13.  
  14. void Solve()
  15. {
  16.     t += 480;
  17.  
  18.     if ((t / 60) < 10)
  19.         cout << 0;
  20.     cout << t / 60;
  21.  
  22.     cout << ":";
  23.  
  24.     if (t % 60 < 10)
  25.         cout << 0;
  26.     cout << t % 60;
  27.  
  28.     cout << "\n";
  29. }
  30.  
  31. int32_t main()
  32. {
  33.     ios::sync_with_stdio(0);
  34.     cin.tie(0);
  35.     cout.tie(0);
  36.     int n;
  37.     for (cin >> n; n--;)
  38.     {
  39.         Read();
  40.         Solve();
  41.     }
  42. }
  43.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement