結果
問題 |
No.652 E869120 and TimeZone
|
ユーザー |
|
提出日時 | 2020-07-07 23:31:22 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 541 bytes |
コンパイル時間 | 1,939 ms |
コンパイル使用メモリ | 193,928 KB |
最終ジャッジ日時 | 2025-01-11 16:43:51 |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 26 WA * 4 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0; i<(int)(n); i++) #define FOR(i,b,e) for (int i=(int)(b); i<(int)(e); i++) #define ALL(x) (x).begin(), (x).end() const double PI = acos(-1); int main() { int a, b; string s; cin >> a >> b >> s; double h = stod(s.substr(3)) - 9.0; int hh = int(abs(h) * 10); int m = 60 * (hh / 10) + (hh % 10) * 6; int tt = 60 * a + b + m * (h >= 0 ? 1 : -1); tt %= 1440; if (tt < 0) tt += 1440; printf("%02d:%02d\n", tt / 60, tt % 60); return 0; }