結果
| 問題 |
No.525 二度寝の季節
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-12-05 12:59:53 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 765 bytes |
| コンパイル時間 | 427 ms |
| コンパイル使用メモリ | 56,200 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-28 16:33:14 |
| 合計ジャッジ時間 | 1,406 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 WA * 15 |
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main(){
string t; cin >> t;
string temp;
string h;
string m;
//まずは:を除いたstring型を成形
temp = t[0];
h = temp;
temp = t[1];
h += temp;
temp = t[3];
m = temp;
temp = t[4];
m += temp;
//整数に変換
int min, hour;
min = stoi(m);
hour = stoi(h);
min += 5;
if(min >= 60){
min = min-60;
hour += 1;
if(hour >= 24){
hour = 0;
}
}
if(min < 10 && hour < 10) cout << "0" << hour << ":" << "0" << min << endl;
else if(min < 10) cout << hour << "0" << ":" << min << endl;
else if(hour < 10) cout << "0" << hour << ":" << min << endl;
return 0;
}