結果

問題 No.652 E869120 and TimeZone
ユーザー kotamanegikotamanegi
提出日時 2018-02-23 22:31:00
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,467 bytes
コンパイル時間 764 ms
コンパイル使用メモリ 87,816 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-05-09 19:53:32
合計ジャッジ時間 1,671 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 AC 2 ms
5,376 KB
testcase_15 WA -
testcase_16 AC 2 ms
5,376 KB
testcase_17 AC 2 ms
5,376 KB
testcase_18 AC 1 ms
5,376 KB
testcase_19 WA -
testcase_20 AC 1 ms
5,376 KB
testcase_21 AC 1 ms
5,376 KB
testcase_22 AC 2 ms
5,376 KB
testcase_23 WA -
testcase_24 AC 2 ms
5,376 KB
testcase_25 AC 1 ms
5,376 KB
testcase_26 AC 2 ms
5,376 KB
testcase_27 WA -
testcase_28 AC 2 ms
5,376 KB
testcase_29 AC 1 ms
5,376 KB
testcase_30 AC 2 ms
5,376 KB
testcase_31 AC 1 ms
5,376 KB
testcase_32 AC 2 ms
5,376 KB
testcase_33 AC 2 ms
5,376 KB
testcase_34 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream>
#include<map>
#include <iomanip>
#include <time.h>
#include <stdlib.h>
#include <list>
#include <typeinfo>
#include <list>
#include <set>
#include <cassert>
#include<fstream>
#include <cstdlib>
#define EVAL 1
using namespace std;
#define Ma_PI 3.141592653589793
#define eps 0.000001
#define LONG_INF 3000000000000000000
#define GOLD 1.61803398874989484820458
#define MAX_MOD 1000000007LL
#define REP(i,n) for(long long i = 0;i < n;++i)
#define seg_size 1048576
#define PI 3.1415926535
int main() {
	int a, b;
	cin >> a >> b;
	string s;
	cin >> s;
	string c;
	int poo = 0;
	for (int i = 3;i < s.length();++i) {
		if (s[i] != '.') {
			c.push_back(s[i]);
		}
		else poo = 1;
	}
	int gee = stoi(c);
	if (poo == 0) {
		a += gee;
		a -= 9;
		a += 48;
		a %= 24;
	}
	else {
		int moo = abs(gee) / 10;
		if (gee < 0) moo = -moo;
		a += moo;
		a -= 9;
		a += 48;
		a %= 24;
		moo = gee % 10 * 6;
		if (gee < 0) moo = -moo;
		b += moo;
		if (b < 0) {
			b += 60;
			a--;
			a += 24;
			a %= 24;
		}
		if (b >= 60) {
			b -= 60;
			a++;
			a %= 24;
		}
	}
	if (a / 10 == 0) {
		cout << "0";
	}
	cout << a << ":";
	if (b / 10 == 0) {
		cout << "0";
	}
	cout << b << endl;
	return 0;
}
0