Advertisement
simushin_pavel

Untitled

Dec 21st, 2020
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main(){
  4.     ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  5.     long long h, m, hans, mans; cin >> h >> m;
  6.     hans=(330+((h*60+m-330)%16?((h*60+m-330)/16+1)*16:h*60+m-330))%1440/60;
  7.     mans=(330+((h*60+m-330)%16?((h*60+m-330)/16+1)*16:h*60+m-330))%1440%60;
  8.     cout << hans << (mans<10?":0":":") << mans;
  9.     return 0;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement