結果
問題 |
No.525 二度寝の季節
|
ユーザー |
|
提出日時 | 2022-01-02 23:50:06 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 553 bytes |
コンパイル時間 | 1,652 ms |
コンパイル使用メモリ | 168,708 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-12 04:34:51 |
合計ジャッジ時間 | 2,351 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 33 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { string time; cin >> time; string h(time.begin(), time.begin()+2); string m(time.begin()+3, time.begin()+5); int hh = stoi(h); int mm = stoi(m); mm += 5; if(mm >= 60) { hh++; mm -= 60; if(hh == 24) hh = 0; } string h_out = to_string(hh); string m_out = to_string(mm); if(h_out.size() == 1) h_out = '0' + h_out; if(m_out.size() == 1) m_out = '0' + m_out; cout << h_out << ':' << m_out << '\n'; return 0; }