結果

問題 No.1236 長針と短針
ユーザー chacoder1chacoder1
提出日時 2021-01-10 10:58:56
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 286 bytes
コンパイル時間 2,103 ms
コンパイル使用メモリ 200,432 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-30 21:00:06
合計ジャッジ時間 2,553 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,812 KB
testcase_01 AC 2 ms
6,944 KB
testcase_02 AC 1 ms
6,944 KB
testcase_03 AC 1 ms
6,940 KB
testcase_04 WA -
testcase_05 AC 2 ms
6,940 KB
testcase_06 AC 2 ms
6,944 KB
testcase_07 AC 1 ms
6,940 KB
testcase_08 AC 2 ms
6,940 KB
testcase_09 AC 1 ms
6,940 KB
testcase_10 WA -
testcase_11 AC 2 ms
6,944 KB
testcase_12 WA -
testcase_13 AC 2 ms
6,944 KB
testcase_14 AC 1 ms
6,944 KB
testcase_15 AC 1 ms
6,940 KB
testcase_16 AC 1 ms
6,944 KB
testcase_17 WA -
testcase_18 AC 1 ms
6,940 KB
testcase_19 AC 1 ms
6,940 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 2 ms
6,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main(){
  double a,b,h,m;
  cin>>a>>b;
  h=a*30+(b/60)*30;
  if(b==0){
    b+=60;
  }
  m=b*6;
  if(h<m){
    h+=360;
  }
  //cout<<setprecision(5)<<h<<" "<<m<<endl;
  double ans=((h-m)/5.5)*60;
  cout<<floor(ans)<<endl;
  return 0;
}
0