結果
| 問題 |
No.89 どんどんドーナツどーんといこう!
|
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2014-12-07 19:25:35 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 347 bytes |
| コンパイル時間 | 365 ms |
| コンパイル使用メモリ | 59,120 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-05 22:20:51 |
| 合計ジャッジ時間 | 882 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:8:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%d %d %d", &c, &rin, &rout);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <cstdio>
#include <iostream>
#include <cmath> // M_PI
using namespace std;
int main() {
int c, rin, rout;
scanf("%d %d %d", &c, &rin, &rout);
double r = (rout - rin) / 2.0;
double area = r * r * M_PI;
double cir = 2 * M_PI * (rin + r);
double ans = c * area * cir;
printf("%lf\n", ans);
}
norioc