結果
問題 |
No.1236 長針と短針
|
ユーザー |
![]() |
提出日時 | 2020-09-25 22:24:17 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 488 bytes |
コンパイル時間 | 1,711 ms |
コンパイル使用メモリ | 192,804 KB |
最終ジャッジ日時 | 2025-01-14 21:06:04 |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 WA * 9 |
ソースコード
#include <bits/stdc++.h> using namespace std; template <typename T, typename U> void cmin(T &a, U b) { if (a > b) a = b; } template <typename T, typename U> void cmax(T &a, U b) { if (a < b) a = b; } int main() { cin.tie(nullptr); ios_base::sync_with_stdio(false); int A, B; cin >> A >> B; if (A <= 12) A -= 12; long double H = 360 / 12 * A + 360.0 / 12 / 60 * B; long double M = 360 / 60 * B; if (H < M) H += 360.0; cout << floor((H - M) / 5.5 * 60) << "\n"; }