結果

問題 No.1236 長針と短針
ユーザー hgoto
提出日時 2020-10-27 13:31:48
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 391 bytes
コンパイル時間 2,152 ms
コンパイル使用メモリ 191,500 KB
最終ジャッジ日時 2025-01-15 16:00:26
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

#ifdef LOCAL
#include <debug.hpp>
#else
#define debug(...) void()
#endif

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int h, m;
  cin >> h >> m;
  if (h >= 12) h -= 12;
  int lon = h * 3600 + m * 60;
  int sho = m * 60 * 12;
  int dist = lon - sho;
  if (dist < 0) dist += 3600 * 12;
  cout << dist / 11 << '\n';
  return 0;
}
0