結果
| 問題 |
No.1236 長針と短針
|
| コンテスト | |
| ユーザー |
YamaKasa
|
| 提出日時 | 2020-09-26 00:35:29 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 548 bytes |
| コンパイル時間 | 1,543 ms |
| コンパイル使用メモリ | 165,320 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-28 08:30:01 |
| 合計ジャッジ時間 | 2,317 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 15 WA * 5 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int A, B;
cin >> A >> B;
A %= 12;
double t1 = (6 * B) % 360;
double t2 = (30 * A) % 360 + (double)B / 2.0;
//cout << t1 << " " << t2 << "\n";
int f1 = 2 * 6 * B;
int f2 = 2 * 30 * A + B;
if (t1 > t2) {
cout << (360 - (f1 - f2)) * 60 / 11 << "\n";
} else {
cout << (f2 - f1) * 60 / 11 << "\n";
}
// cout << (360 - (f1 - f2)) * 60 / 11 << "\n";
// cout << (f2 - f1) * 60 / 11 << "\n";
return 0;
}
YamaKasa