結果
問題 |
No.89 どんどんドーナツどーんといこう!
|
ユーザー |
|
提出日時 | 2015-04-20 21:12:52 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 309 bytes |
コンパイル時間 | 413 ms |
コンパイル使用メモリ | 59,392 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-05 22:30:18 |
合計ジャッジ時間 | 1,057 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 |
コンパイルメッセージ
main.cpp: In function ‘int main(int, char**)’: main.cpp:9:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | scanf("%lf %lf %lf", &C, &Rin, &Rout); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#define _USE_MATH_DEFINES #include <stdio.h> #include <iostream> #include <math.h> using namespace std; int main(int argc, char *argv[]) { double C, Rin, Rout, rad; scanf("%lf %lf %lf", &C, &Rin, &Rout); rad = (Rout - Rin) / 2; printf("%f\n", (rad + Rin) * 2 * M_PI * rad * rad * M_PI * C); return 0; }