結果
| 問題 |
No.525 二度寝の季節
|
| コンテスト | |
| ユーザー |
feybk
|
| 提出日時 | 2017-06-09 22:55:54 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 729 bytes |
| コンパイル時間 | 475 ms |
| コンパイル使用メモリ | 58,412 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-22 16:31:17 |
| 合計ジャッジ時間 | 1,513 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 30 WA * 3 |
ソースコード
#include <iostream>
#include <cstdlib>
#include <string>
using namespace std;
int main(){
string T;
cin >> T;
int a[5];
for(size_t i=0; i<T.size();i++){
a[i] = T[i] - '0';
}
int h = 10*a[0] + a[1];
int m = 10*a[3] + a[4];
if(m+5 >= 60){
m = (m+5) % 60;
if(h + 1 == 24){
cout << "00:" << "0" << to_string(m) << endl;
}else{
if(h < 10){
cout << "0" << to_string(h) << ":0" << to_string(m) << endl;
}else{
cout << to_string(h) << ":0" << to_string(m) << endl;
}
}
}else{
m += 5;
if(m < 10){
cout << T[0] << T[1] << ":0" << to_string(m) << endl;
}else{
cout << T[0] << T[1] << ":" << to_string(m) << endl;
}
}
return 0;
}
feybk