結果

問題 No.525 二度寝の季節
ユーザー halship
提出日時 2017-06-30 11:29:24
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 415 bytes
コンパイル時間 490 ms
コンパイル使用メモリ 62,680 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-04 18:18:22
合計ジャッジ時間 1,396 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <iomanip>
#include <string>
using namespace std;

string T;

int main() {
    cin >> T;

    int hour = stoi(T.substr(0, 2));
    int minute = stoi(T.substr(3, 2));

    minute += 5;
    if (minute >= 60) {
        ++hour;
        minute %= 60;

        if (hour > 23) hour %= 24;
    }

    cout << setw(2) << setfill('0') << hour << ":" << setw(2) << setfill('0') << minute << endl;
}
0