結果

問題 No.525 二度寝の季節
ユーザー maicune
提出日時 2019-09-01 18:54:17
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 402 bytes
コンパイル時間 1,633 ms
コンパイル使用メモリ 164,056 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-29 01:47:07
合計ジャッジ時間 2,901 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int main(){
    string s,tmp;
    cin>>s;
    istringstream t(s);
    vector<int> a;
    while(getline(t,tmp,':')){
        a.emplace_back(stoi(tmp));
    }
    a.back()+=5;
    a.front()+=a.back()/60;
    a.back()%=60;
    a.front()%=24;
    ostringstream ans;
    ans<<setw(2)<<setfill('0')<<a.front()<<':'<<setw(2)<<a.back();
    cout<<ans.str()<<endl;
}
0