結果
| 問題 | 
                            No.652 E869120 and TimeZone
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2018-02-24 03:16:51 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 866 bytes | 
| コンパイル時間 | 1,421 ms | 
| コンパイル使用メモリ | 168,540 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-12-17 13:41:11 | 
| 合計ジャッジ時間 | 2,341 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 5 | 
| other | AC * 14 WA * 16 | 
ソースコード
#include <bits/stdc++.h>
#define FOR(i,a,b) for(int i = (a); i < (b); ++i)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) for(int i = (n) - 1; (i) >= 0; --i)
#define SZ(n) (int)(n).size()
#define ALL(n) (n).begin(), (n).end()
#define MOD LL(1e9 + 7)
#define INF 1000000
using namespace std;
typedef long long LL;
typedef vector<int> VI;
typedef pair<int, int> PI;
int main() {
	int a, b;
	string s;
	cin >> a >> b >> s;
	double t = stoi(s.substr(3, s.length() - 3));
	if (s[s.size() - 2] == '.')
		t += (s[s.length() - 1] - '0') * 0.1;
	t -= 9;
	b += t * 60;
	while (b >= 60) {
		a++;
		b -= 60;
	}
	while (b < 0) {
		a--;
		b += 60;
	}
	if (a >= 24)
		a -= 24;
	if (a < 0)
		a += 24;
	string h = to_string(a);
	string m = to_string(b);
	if (h.length() == 1)
		h.insert(0, "0");
	if (m.length() == 1)
		m.insert(0, "0");
	cout << h << ":" << m << endl;
	return 0;
}