結果
| 問題 |
No.652 E869120 and TimeZone
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-03-18 23:00:54 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 847 bytes |
| コンパイル時間 | 1,156 ms |
| コンパイル使用メモリ | 101,536 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-11 12:24:35 |
| 合計ジャッジ時間 | 1,726 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | AC * 30 |
ソースコード
#define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <limits>
#include <climits>
#include <cfloat>
#include <functional>
#include <iterator>
using namespace std;
int main()
{
int a, b;
cin >> a >> b;
cin.ignore(4);
double x;
cin >> x;
x *= 60;
x += (x >= 0.0 ? +0.5 : -0.5);
int c = (int)x;
int t = a * 60 + b + (c - 9 * 60);
t %= 24 * 60;
t += 24 * 60;
t %= 24 * 60;
int h = t / 60;
int m = t % 60;
cout << setfill('0');
cout << setw(2) << h << ':' << setw(2) << m << endl;
return 0;
}