結果
問題 |
No.652 E869120 and TimeZone
|
ユーザー |
|
提出日時 | 2018-04-29 20:56:04 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 528 bytes |
コンパイル時間 | 508 ms |
コンパイル使用メモリ | 65,536 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 23:41:08 |
合計ジャッジ時間 | 1,509 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 28 WA * 2 |
ソースコード
#include<iostream> using namespace std; int main(){ double a, b; string t; cin >> a >> b >> t; double utc = (stod(t.substr(3, t.size()))) - 9.0; double difmin = (utc*10*6); b += difmin; if(b >= 60){ a += (int)b/60; b -= (int)b/60 * 60; }else if(b < 0){ while(b < 0){ a--; b += 60.0; } } if(a < 0) a += 24; if(a > 24) a -= 24; cout << (10 > a ? "0" : "") << a << ":" << (10 > b ? "0" : "") << b << endl; return 0; }