結果

問題 No.525 二度寝の季節
ユーザー Ichimiya
提出日時 2020-05-02 23:59:25
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 1,000 ms
コード長 335 bytes
コンパイル時間 1,756 ms
コンパイル使用メモリ 163,112 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2025-01-02 02:33:03
合計ジャッジ時間 3,190 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
	string s;
	cin >> s;

	int h = stoi(s.substr(0, 2)),
		m = stoi(s.substr(3, 2));
	//cout << h << m << endl;

	m += 5;
	if (m >= 60) {
		m -= 60;
		h++;
	}
	if (h >= 24) {
		h -= 24;
	}

	if (h < 10) cout << 0;
	cout << h << ':';
	if (m < 10) cout << 0;
	cout << m << endl;
}
0