結果
問題 |
No.525 二度寝の季節
|
ユーザー |
|
提出日時 | 2017-06-21 11:44:32 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 561 bytes |
コンパイル時間 | 584 ms |
コンパイル使用メモリ | 64,984 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-02 10:45:45 |
合計ジャッジ時間 | 1,596 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 33 |
ソースコード
#include <iostream> #include <string> #include <sstream> #include <iomanip> int main(int argc, char** argv) { std::string input; std::cin >> input; std::stringstream ss(input); std::string buffer; int hour; int min; getline(ss, buffer, ':'); hour = std::stoi(buffer); getline(ss, buffer, ':'); min = std::stoi(buffer); min += 5; if (min > 59) { min -= 60; hour++; if (hour > 23) { hour -= 24; } } std::cout << std::setfill('0') << std::setw(2) << hour << ":"; std::cout << std::setfill('0') << std::setw(2) << min << std::endl; }