結果
問題 |
No.1236 長針と短針
|
ユーザー |
![]() |
提出日時 | 2024-11-11 00:41:48 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 523 bytes |
コンパイル時間 | 3,625 ms |
コンパイル使用メモリ | 245,628 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-11 00:41:53 |
合計ジャッジ時間 | 3,825 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { int a, b; cin >> a >> b; vector<int> ans; rep(i, 12) ans.push_back(i * 12 * 60 * 60 / 11); Debug(ans); int now = (a * 3600 + b * 60) % (12 * 60 * 60); for (auto x : ans) { if (x >= now) { cout << x - now << endl; break; } } return 0; }