結果
| 問題 |
No.89 どんどんドーナツどーんといこう!
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-04-20 21:13:26 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 313 bytes |
| コンパイル時間 | 411 ms |
| コンパイル使用メモリ | 58,672 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-05 22:30:26 |
| 合計ジャッジ時間 | 916 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 * (rad * rad) * (M_PI * M_PI) * C);
return 0;
}