結果
問題 | No.105 arcの六角ボルト |
ユーザー |
![]() |
提出日時 | 2015-03-03 21:48:00 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 24 ms / 5,000 ms |
コード長 | 503 bytes |
コンパイル時間 | 343 ms |
コンパイル使用メモリ | 39,552 KB |
実行使用メモリ | 6,812 KB |
最終ジャッジ日時 | 2024-06-24 01:16:57 |
合計ジャッジ時間 | 677 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:11:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 11 | scanf("%d", &T); | ~~~~~^~~~~~~~~~ main.cpp:17:18: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 17 | scanf("%lf %lf", &x, &y); | ~~~~~^~~~~~~~~~~~~~~~~~~
ソースコード
#include <cstdio>#include <cmath>#include <tuple>typedef std::pair<double,double> P;const double EPS = 1e-8;int main(){int T;scanf("%d", &T);while(T--){double theta;for(int i=0;i<6;i++){double x, y;scanf("%lf %lf", &x, &y);double t = asin(y) * 360.0 / (2.0 * M_PI);if(x > -EPS && - EPS < t && t < 50.0 + EPS){theta = t;}}printf("%.10f\n", theta);}}