結果
問題 | No.525 二度寝の季節 |
ユーザー |
![]() |
提出日時 | 2017-06-09 22:37:55 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 583 bytes |
コンパイル時間 | 1,443 ms |
コンパイル使用メモリ | 167,376 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-22 15:29:20 |
合計ジャッジ時間 | 2,445 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 33 |
ソースコード
#include<bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define rep(i,n) for(int i=0;i<(int)(n);i++) #define reps(i,s,n) for(int i=(int)(s);i<(int)(n);i++) int main() { cin.sync_with_stdio(false); string t; cin >> t; int a = (t[0] - '0') * 10 + (t[1] - '0'); int b = (t[3] - '0') * 10 + (t[4] - '0'); if (b + 5 >= 60) { b -= 60; a += 1; } if (a >= 24) { a -= 24; } if (a < 10) { cout << 0 << a; } else { cout << a; } cout << ":"; if (b+5 < 10) { cout <<0<< b+5; } else { cout << b+5; } cout << endl; return 0; }