結果
| 問題 |
No.525 二度寝の季節
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-30 08:46:15 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 642 bytes |
| コンパイル時間 | 1,713 ms |
| コンパイル使用メモリ | 168,272 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-19 06:22:35 |
| 合計ジャッジ時間 | 2,607 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 33 |
ソースコード
/**
@file 525.cpp
@title No.525 二度寝の季節 - yukicoder
@url https://yukicoder.me/problems/no/525
**/
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
#define ALL(obj) (obj).begin(), (obj).end()
#define REP(i, N) for (int i = 0; i < (N); ++i)
int main() {
string T;
cin >> T;
int h = stoi(T.substr(0, 2));
int m = stoi(T.substr(3, 2));
if (m + 5 >= 60) {
if (h + 1 >= 24) {
h = 0;
m = m + 5 - 60;
} else {
h++;
m = m + 5 - 60;
}
} else {
m += 5;
}
cout << setfill('0') << setw(2) << h << ":" << setfill('0') << setw(2) << m << endl;
return 0;
}