結果
問題 | No.89 どんどんドーナツどーんといこう! |
ユーザー | norioc |
提出日時 | 2014-12-07 19:25:35 |
言語 | C++11 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 347 bytes |
コンパイル時間 | 504 ms |
コンパイル使用メモリ | 57,940 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-04-15 19:31:12 |
合計ジャッジ時間 | 840 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
5,248 KB |
testcase_01 | AC | 1 ms
5,376 KB |
testcase_02 | AC | 2 ms
5,376 KB |
testcase_03 | AC | 1 ms
5,376 KB |
testcase_04 | AC | 1 ms
5,376 KB |
testcase_05 | AC | 1 ms
5,376 KB |
testcase_06 | AC | 2 ms
5,376 KB |
testcase_07 | AC | 1 ms
5,376 KB |
testcase_08 | AC | 2 ms
5,376 KB |
testcase_09 | AC | 1 ms
5,376 KB |
testcase_10 | AC | 2 ms
5,376 KB |
コンパイルメッセージ
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); }