結果
| 問題 | No.525 二度寝の季節 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2017-08-30 05:00:39 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 1,102 bytes | 
| コンパイル時間 | 911 ms | 
| コンパイル使用メモリ | 75,276 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-11-06 12:33:08 | 
| 合計ジャッジ時間 | 2,197 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 33 | 
ソースコード
#include <algorithm>
#include <array>
#include <iomanip>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#define FOR(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define FORR(i,l,n) for(int (i)=l;(i)<(int)(n);++(i))
std::vector<std::string> split(const std::string& str, char delim);
int main() {
	std::ios::sync_with_stdio(false);
	std::string T;
	std::cin >> T;
	std::vector<std::string> vSt;
	vSt = split(T, ':');
	int h = std::atoi(vSt[0].c_str());
	int m = std::atoi(vSt[1].c_str());
	m += 5;
	if (m / 60 != 0) {
		h += (m / 60);
	}
	m = (m % 60);
	if (h / 24 != 0) {
		h = (h%24);
	}
	if (h < 10) {
		vSt[0] = "0" + std::to_string(h);
	}
	else {
		vSt[0] = std::to_string(h);
	}
	if(m < 10){
		vSt[1] = "0" + std::to_string(m);
	}
	else {
		vSt[1] = std::to_string(m);
	}
	std::cout << vSt[0] << ':' << vSt[1] << std::endl;
	
	return 0;
}
std::vector<std::string> split(const std::string& str, char delim) {
	std::vector<std::string> vSt;
	std::stringstream ss(str);
	std::string buffer;
	while (std::getline(ss, buffer, delim)) {
		vSt.push_back(buffer);
	}
	return vSt;
}
            
            
            
        