結果
問題 | No.525 二度寝の季節 |
ユーザー |
![]() |
提出日時 | 2017-06-10 00:16:28 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 657 bytes |
コンパイル時間 | 1,694 ms |
コンパイル使用メモリ | 159,740 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-22 20:52:43 |
合計ジャッジ時間 | 2,502 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 33 |
ソースコード
#include <bits/stdc++.h> #define rep(i, a, n) for(int i = a; i < n; i++) #define repb(i, a, b) for(int i = a; i >= b; i--) #define all(a) a.begin(), a.end() #define o(a) cout << a << endl #define int long long #define fi first #define se second using namespace std; typedef pair<int, int> P; int change_to_i(string s){ stringstream ss; int k; ss<<s; ss>>k; return k; } signed main(){ int h, m; string s; cin >> s; h = change_to_i(s.substr(0, 2)); m = change_to_i(s.substr(3, 5)); m += 5; if(m >= 60){ h++; m -= 60; } if(h >= 24){ h -= 24; } printf("%02lld:%02lld\n", h, m); }