結果

問題 No.525 二度寝の季節
ユーザー nCk_cv
提出日時 2017-08-31 20:07:01
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 1,000 ms
コード長 565 bytes
コンパイル時間 701 ms
コンパイル使用メモリ 75,800 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-06 16:42:42
合計ジャッジ時間 1,837 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <vector>
#include <queue>
#include <deque>
#include <cmath>

#define AS(a) (sizeof(a)/sizeof(a[0]))
using namespace std;
long long int MOD = 1000000007;
long long int INF = 1000000007;


int main() {
  string T;
  cin >> T;
  string hh = T.substr(0,2);



  int h = std::stoi(T.substr(0,2));
  int m = std::stoi(T.substr(3,5));

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



}
0