結果
問題 | No.652 E869120 and TimeZone |
ユーザー |
|
提出日時 | 2018-02-23 22:57:23 |
言語 | C++11 (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 648 bytes |
コンパイル時間 | 674 ms |
コンパイル使用メモリ | 68,288 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-17 13:24:18 |
合計ジャッジ時間 | 1,666 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 19 WA * 11 |
ソースコード
#include <iostream> #include <algorithm> #include <string> #include <sstream> #include <iomanip> #define rep(i, a, n) for(int i = a;i < n;i++) #define repr(i, a, n) for(int i = a;i > n;i--) using namespace std; int a, b; string s; int t; double utc; void input(){ cin >> a >> b >> s; string s1; rep(i, 3,(int)s.size()) s1.push_back(s[i]); stringstream ss; ss << s1; ss >> utc; } void solve(){ t = a*60 + b; t += (int)((utc - 9.0)*60); int h = (int)(t/60.0 + 24) % 24; int m = (t+60) % 60; cout << setfill('0') << setw(2) << h << ':'; cout << setfill('0') << setw(2) << m << endl; } int main(){ input(); solve(); return 0; }