結果
| 問題 |
No.1236 長針と短針
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-25 22:51:19 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 478 bytes |
| コンパイル時間 | 1,773 ms |
| コンパイル使用メモリ | 193,540 KB |
| 最終ジャッジ日時 | 2025-01-14 21:22:05 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, ss, ee) for (int i = (ss); i < (ee); ++i)
void solve() {
vector<double> tm(13);
double t = (12.0 / 11) * 3600;
rep(i, 0, 13) { tm[i] = t * i; }
int a, b;
cin >> a >> b;
a %=12;
int x = (a * 3600 + b * 60);
int ans;
if (tm[a] - x >= 0) {
ans = tm[a] - x;
} else {
ans = tm[a + 1] - x;
}
cout << ans << endl;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
solve();
}