結果
| 問題 |
No.652 E869120 and TimeZone
|
| コンテスト | |
| ユーザー |
ngtkana
|
| 提出日時 | 2020-03-15 15:54:14 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 629 bytes |
| コンパイル時間 | 2,497 ms |
| コンパイル使用メモリ | 191,664 KB |
| 最終ジャッジ日時 | 2025-01-09 06:59:15 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | AC * 7 WA * 23 |
ソースコード
#include<bits/stdc++.h>
using lint=long long;
int main(){
std::cin.tie(nullptr);std::ios_base::sync_with_stdio(false);
std::cout.setf(std::ios_base::fixed);std::cout.precision(15);
lint a,b;std::cin>>a>>b;
a-=9;
if(a<0)a+=24;
char c;
for(lint i=0;i<4;i++)std::cin>>c;
lint x;std::cin>>x;
a+=c=='+'?x:-x;
char d;std::cin>>d;
if(d=='.'){
std::cin>>x;
x=30;
b+=c=='+'?x:-x;
}
if(b<0)b+=60,a--;
if(60<=b)b-=60,a++;
if(a<0)a+=24;
if(24<=a)a-=24;
std::cout<<std::setw(2)<<std::setfill('0')<<a<<':'<<std::setw(2)<<std::setfill('0')<<b<<'\n';
}
ngtkana