結果
| 問題 | No.525 二度寝の季節 | 
| コンテスト | |
| ユーザー |  sorag | 
| 提出日時 | 2022-08-17 20:39:51 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 1,083 bytes | 
| コンパイル時間 | 692 ms | 
| コンパイル使用メモリ | 77,860 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-10-05 01:26:01 | 
| 合計ジャッジ時間 | 1,807 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 33 | 
ソースコード
#include <iostream>
#include<utility>
#include <vector>
#include <map>
#include<string>
#include<queue>
#include<math.h>
#define pb push_back
#define all(x) begin(x),end(x)
#define ll long long
#define P pair<int,int>
#define lP pait<ll,ll>
using namespace std;
int main() {
    int a,b;
    char e;
    cin>>a>>e>>b;
    if(a<9){
        if(b>54){
            cout<<'0'<<a+1<<e<<'0'<<(b+5)%60<<endl;
    }
        else if(b<5) cout<<'0'<<a<<e<<'0'<<b+5<<endl;
        else cout<<'0'<<a<<e<<b+5<<endl;
    }
    else if(a==23){
        if(b>54){
        cout<<'0'<<(a+1)%24<<e<<'0'<<(b+5)%60<<endl;
    }
        else if(b<5) cout<<'0'<<a<<e<<'0'<<b+5<<endl;
        else cout<<a<<e<<b+5<<endl;
    }
    else if(a==9){
        if(b>54) cout<<a+1<<e<<'0'<<(b+5)%60<<endl;
        else if(b<5) cout<<'0'<<a<<e<<'0'<<b+5<<endl;
        else cout<<'0'<<a<<e<<b+5<<endl;
    }
    else {
        if(b>54){
        cout<<(a+1)%24<<e<<'0'<<(b+5)%60<<endl;
    }
        else if(b<5) cout<<'0'<<a<<e<<'0'<<b+5<<endl;
        else cout<<a<<e<<b+5<<endl;
    }
    
    return 0;
}
  
    
            
            
            
        