結果

問題 No.652 E869120 and TimeZone
ユーザー Bantako
提出日時 2018-05-29 19:14:37
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 434 bytes
コンパイル時間 1,748 ms
コンパイル使用メモリ 166,972 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-30 08:03:03
合計ジャッジ時間 2,538 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 28 WA * 2
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    7 | main(){
      | ^~~~

ソースコード

diff #

#include<bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
using namespace std;
typedef long long ll;
int INF = (1LL << 30) - 1;
int MOD = 1e9+7;
main(){
    int a,b;
    string S;
    cin >> a >> b >> S;
    int time = a * 60 + b;
    int dif = (int)(stof(S.substr(3) ) * 60);
    //if(S[3] == '-')dif *= -1;
    time += dif - 60*9;
    time = (time + 60*24) % (60*24);
    printf("%02d:%02d\n" ,time/60 ,time%60);
}
0