結果
問題 |
No.525 二度寝の季節
|
ユーザー |
|
提出日時 | 2017-06-21 11:40:04 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 550 bytes |
コンパイル時間 | 736 ms |
コンパイル使用メモリ | 64,856 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-02 10:45:33 |
合計ジャッジ時間 | 6,155 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 2 |
other | RE * 33 |
ソースコード
#include <iostream> #include <string> #include <sstream> #include <iomanip> int main(int argc, char** argv) { std::string input = argv[1]; 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; }