結果

問題 No.652 E869120 and TimeZone
コンテスト
ユーザー kotatsugame
提出日時 2018-06-14 23:37:26
言語 C++14
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 256 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 369 ms
コンパイル使用メモリ 73,544 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2026-03-20 16:48:50
合計ジャッジ時間 1,327 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 2
other AC * 24 WA * 7
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    6 | main()
      | ^~~~

ソースコード

diff #
raw source code

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