結果
| 問題 |
No.652 E869120 and TimeZone
|
| コンテスト | |
| ユーザー |
kotamanegi
|
| 提出日時 | 2018-02-23 22:31:00 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,467 bytes |
| コンパイル時間 | 819 ms |
| コンパイル使用メモリ | 87,816 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-17 13:15:25 |
| 合計ジャッジ時間 | 1,785 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | AC * 19 WA * 11 |
ソースコード
#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;
}
kotamanegi