結果
| 問題 |
No.525 二度寝の季節
|
| コンテスト | |
| ユーザー |
kya_ski
|
| 提出日時 | 2020-04-14 17:49:10 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 1,000 ms |
| コード長 | 451 bytes |
| コンパイル時間 | 1,513 ms |
| コンパイル使用メモリ | 168,860 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-01 17:19:39 |
| 合計ジャッジ時間 | 2,825 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 33 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int h = stoi(s.substr(0, 2));
int m = stoi(s.substr(3, 2));
if ((m += 5) >= 60) {
m -= 60;
h = (h + 1) % 24;
}
string ansh = to_string(h);
if (ansh.size() == 1) ansh = "0" + ansh;
string ansm = to_string(m);
if (ansm.size() == 1) ansm = "0" + ansm;
cout << ansh << ':' << ansm << '\n';
return 0;
}
kya_ski