結果
| 問題 | No.1236 長針と短針 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-26 00:58:23 |
| 言語 | C++17(clang) (17.0.6 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 751 bytes |
| 記録 | |
| コンパイル時間 | 2,570 ms |
| コンパイル使用メモリ | 163,944 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-28 08:53:30 |
| 合計ジャッジ時間 | 3,404 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 4 WA * 16 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main()
{
vector<int>arr;
arr.push_back(3600+5*60+27);
arr.push_back(2*3600+10*60+55);
arr.push_back(3*3600+21*60+22);
arr.push_back(4*3600+21*60+49);
arr.push_back(5*3600+27*60+17);
arr.push_back(6*3600+32*60+44);
arr.push_back(7*3600+38*60+11);
arr.push_back(8*3600+43*60+38);
arr.push_back(9*3600+49*60+6);
arr.push_back(10*3600+54*60+33);
arr.push_back(0);
int ans = 1e9;
int a, b;
cin >> a >> b;
a = a % 12;
int total = a*3600 + b * 60;
//cout << total << endl;
for(int i=0; i<arr.size(); i++)
{
if(arr[i]-total>=0)
{
ans = min(ans,arr[i]-total);
}
}
cout << ans << endl;
}