結果
| 問題 | No.652 E869120 and TimeZone |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-02-23 22:47:43 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 575 bytes |
| 記録 | |
| コンパイル時間 | 523 ms |
| コンパイル使用メモリ | 80,812 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-05-26 17:49:17 |
| 合計ジャッジ時間 | 2,068 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | AC * 25 WA * 6 |
ソースコード
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <map>
#include <vector>
#include <queue>
#include <algorithm>
using namespace std;
//typedef pair<int,int> P;
int main(){
int a;
int b;
char S[100];
char num[100];
double utc;
scanf("%d %d %s", &a, &b, S);
strncpy(num, S+4, strlen(S)-4);
sscanf(num,"%lf", &utc);
if(S[3]=='-') utc *= -1;
utc -= 9;
int m = b + (int)(60*utc);
int h = a;
while(m < 0){
m += 60;
h -= 1;
}
h += m/60;
m %= 60;
if(h<0) h+= 24;
h %= 24;
printf("%02d:%02d\n", h, m);
return 0;
}