結果
| 問題 |
No.1236 長針と短針
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-08-11 15:17:23 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 538 bytes |
| コンパイル時間 | 2,574 ms |
| コンパイル使用メモリ | 243,464 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-08-11 15:17:27 |
| 合計ジャッジ時間 | 3,593 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
// #define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;
int A,B;
int main(){
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
cout<<fixed<<setprecision(15);
cin>>A>>B;A%=12;
double init_A=(double)(360*A)/12 + double(B*360)/(60*12);
double init_B=(double)(360*B)/60;
double ato=init_A-init_B;
if(ato<0)ato+=360;
if(ato==0){
cout<<0<<endl; return 0;
}
double diff=(double)360/(60*60) - (double)360/(60*60*12);
double s=ato/diff;
s=floor((s*1000000)+0.5)/1000000;
cout<<(int)s<<endl;
}