結果
問題 |
No.1236 長針と短針
|
ユーザー |
|
提出日時 | 2020-10-16 08:31:23 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 405 bytes |
コンパイル時間 | 1,548 ms |
コンパイル使用メモリ | 165,772 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-20 20:20:22 |
合計ジャッジ時間 | 2,314 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int,int>; const int INF = 1001001001; int main() { int a, b; cin >> a >> b; int t = (a*60 + b) % (12 * 60) * 60; for(int i = 0; i < 12; i++){ int x = i*12*60*60/11; int ans = x - t; if(ans>=0) { cout<<ans<<endl; break; } } return 0; }