Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(){
- ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
- long long h, m, hans, mans; cin >> h >> m;
- hans=(330+((h*60+m-330)%16?((h*60+m-330)/16+1)*16:h*60+m-330))%1440/60;
- mans=(330+((h*60+m-330)%16?((h*60+m-330)/16+1)*16:h*60+m-330))%1440%60;
- cout << hans << (mans<10?":0":":") << mans;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement