結果
| 問題 | No.525 二度寝の季節 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-10-13 23:19:08 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 473 bytes |
| 記録 | |
| コンパイル時間 | 380 ms |
| コンパイル使用メモリ | 74,860 KB |
| 実行使用メモリ | 16,384 KB |
| 最終ジャッジ日時 | 2026-05-12 09:02:29 |
| 合計ジャッジ時間 | 5,216 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 2 |
| other | TLE * 1 -- * 32 |
コンパイルメッセージ
main.cpp: In function 'int output(int, int)':
main.cpp:16:1: warning: no return statement in function returning non-void [-Wreturn-type]
16 | }
| ^
ソースコード
#include <iostream>
#include <iomanip>
using namespace std;
int output(int h, int m){
if(h <= 9){
cout << 0 << h << ":";
}else{
cout << h << ":";
}
if(m <= 9){
cout << 0 << m << endl;
}else{
cout << m << endl;
}
}
int main(){
string T;
cin >> T;
int h = (T[0] - '0') * 10 + (T[1] - '0');
int m = (T[3] - '0') * 10 + (T[4] - '0');
if(m >= 55){
if(h == 23){
output(0, m - 55);
}else{
output(h + 1, m - 55);
}
}else{
output(h, m + 5);
}
}