結果

問題 No.652 E869120 and TimeZone
コンテスト
ユーザー かぼちゃ
提出日時 2018-04-22 18:17:22
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 632 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 603 ms
コンパイル使用メモリ 93,804 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2026-03-17 07:59:47
合計ジャッジ時間 1,607 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 30 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <iostream>
#include <vector>
#include <algorithm>
#include <math.h>
#include <map>
#include <set>
#include <queue>
#include <stack>

#define ALL(x) (x).begin(),(x).end()
#define RALL(x) (x).rbegin(),(x).rend()
#define REP(i,a,n) for(int i = (a);i < (n);i++)
#define PI 3.14159265359
#define MOD 1000000007
#define chmax(a,b) if(a < b)a = b

using namespace std;

int main(){
    int a,b;
    char c;
    double d;
    scanf("%d %d UTC%c%lf",&a,&b,&c,&d);
    a = (24+a)*60 + b;
    d *= c == '-' ? -1 : 1;
    d = 9 - d;
    a -= 60*d;
    b = a%60;
    a /= 60;
    a %= 24;
    printf("%02d:%02d\n",a,b);
    return 0;
}
0