結果
問題 |
No.948 Bomb vs Dush
|
ユーザー |
|
提出日時 | 2019-12-11 03:12:27 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 257 bytes |
コンパイル時間 | 353 ms |
コンパイル使用メモリ | 30,720 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-24 06:32:33 |
合計ジャッジ時間 | 1,677 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 38 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:6:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%lf%lf", &r, &R); | ~~~~~^~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <math.h> constexpr double pi = acos(-1); int main() { double r, R, theta; scanf("%lf%lf", &r, &R); theta = 2 * pi - 2 * asin(r / R); printf("%.20lf\n", theta); printf("%.20lf\n", 2 * R * r * theta + pi * r * r); }