結果

問題 No.1236 長針と短針
ユーザー oooooba
提出日時 2021-08-30 22:01:04
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 592 bytes
コンパイル時間 1,222 ms
コンパイル使用メモリ 112,052 KB
最終ジャッジ日時 2025-01-24 04:09:41
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <array>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <optional>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <vector>

using namespace std; // NOLINT

int main() {
    int32_t a, b;
    cin >> a >> b;
    a %= 12;
    double dl = 6 * b, ds = 30 * a + b / 2.0;
    int32_t ans;
    if (ds >= dl)
        ans = (ds - dl) * 120 / 11;
    else
        ans = (360 - (dl - ds)) * 120 / 11;
    cout << ans << endl;
    return 0;
}
0