結果

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

ソースコード

diff #

#include<iostream>
#include<cstdio>
using namespace std;
int a,b,c,d;
float x;
char p;
main()
{
	scanf("%d %d UTC%c%d.%d",&a,&b,&p,&c,&d);
	if(p=='+')
	{
		b=b+d*6;
		if(b>=60)b-=60,a++;
		a=(a-9+c+24)%24;
	}
	else
	{
		if(d!=0)b=b-(10-d)*6;
		if(b>=60)b-=60,a++;
		a=(a-9-c+24)%24;
	}
	printf("%02d:%02d\n",a,b);
}
0