結果
問題 | No.525 二度寝の季節 |
ユーザー |
![]() |
提出日時 | 2017-06-09 22:24:36 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 914 bytes |
コンパイル時間 | 780 ms |
コンパイル使用メモリ | 98,096 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-22 14:58:59 |
合計ジャッジ時間 | 1,774 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 33 |
ソースコード
#include <iostream> #include <string> #include <vector> #include <queue> #include <stack> #include <map> #include <algorithm> #include <sstream> #include <cmath> #include <set> #include <iomanip> #include <deque> #include <unordered_map> using namespace std; typedef long long ll; #define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++) #define RREP(i,n) for(int (i)=(int)(n)-1;i>=0;i--) #define REMOVE(Itr,n) (Itr).erase(remove((Itr).begin(),(Itr).end(),n),(Itr).end()) #define UNIQUE(Itr) sort((Itr).begin(),(Itr).end()); (Itr).erase(unique((Itr).begin(),(Itr).end()),(Itr).end()) int main() { string s; cin >> s; int h = (s[0] - '0') * 10 + (s[1] - '0'); int m = (s[3] - '0') * 10 + (s[4] - '0'); m += 5; if(m >= 60) { m %= 60; h++; } if(h >= 24) { h %= 24; } cout << (h<10 ? "0" : "") << h << ":" << (m<10 ? "0" : "") << m << endl; return 0; }