結果

問題 No.525 二度寝の季節
ユーザー Naoyk1212Naoyk1212
提出日時 2017-06-09 22:25:02
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 452 bytes
コンパイル時間 534 ms
コンパイル使用メモリ 70,148 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-22 15:02:24
合計ジャッジ時間 1,515 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <iomanip>
#include <stack>
#include <queue>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
using namespace std;

int main(){
    int h, m;
    char c;
    cin >> h >> c >> m;

    if(m + 5 >= 60){
        m = (m + 5) % 60;
        if(h + 1 >= 24){
            h = (h + 1) % 24;
        }
        else{
            h++;
        }
    }
    else{
        m += 5;
    }
    printf("%02d:%02d\n", h, m);
}
0