結果
| 問題 |
No.652 E869120 and TimeZone
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-02-23 22:28:20 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 394 bytes |
| コンパイル時間 | 1,373 ms |
| コンパイル使用メモリ | 168,768 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-11 12:17:41 |
| 合計ジャッジ時間 | 2,248 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | AC * 30 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
int main(){
int a,b;cin>>a>>b;
string s;cin>>s;
string t=s.substr(4);
double d=stod(t);
int tim=a*60+b;
tim+=1440;
tim-=60*9;
tim%=1440;
if(s[3]=='+'){
int q=tim+d*60;
q%=1440;
printf("%02d:%02d\n",q/60,q%60);
}
else{
int q=tim+1440-d*60;
q%=1440;
printf("%02d:%02d\n",q/60,q%60);
}
}