結果
問題 | No.89 どんどんドーナツどーんといこう! |
ユーザー | mafuyu-aki |
提出日時 | 2017-05-22 23:54:25 |
言語 | C++11 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 407 bytes |
コンパイル時間 | 201 ms |
コンパイル使用メモリ | 30,976 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-04-15 19:46:02 |
合計ジャッジ時間 | 811 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 1 ms
5,376 KB |
testcase_02 | AC | 1 ms
5,376 KB |
testcase_03 | AC | 1 ms
5,376 KB |
testcase_04 | AC | 0 ms
5,376 KB |
testcase_05 | AC | 1 ms
5,376 KB |
testcase_06 | AC | 1 ms
5,376 KB |
testcase_07 | AC | 1 ms
5,376 KB |
testcase_08 | AC | 0 ms
5,376 KB |
testcase_09 | AC | 1 ms
5,376 KB |
testcase_10 | AC | 1 ms
5,376 KB |
コンパイルメッセージ
main.cpp: In function ‘int main(int, char**)’: main.cpp:13:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 13 | scanf("%d", &C); | ~~~~~^~~~~~~~~~ main.cpp:17:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 17 | scanf("%d %d", &Rin, &Rout); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #define READ_BUFSIZE ( 1024 ) #define READ_DELIMITER ( " " ) int main(int argc, char *argv[]) { int C = 0; scanf("%d", &C); int Rin = 0; int Rout = 0; scanf("%d %d", &Rin, &Rout); double pi = acos(0) * 2; double V = pi * pi * (Rin + Rout)* ((Rout - Rin)*(Rout - Rin)) / 4 * C; printf("%lf\n", V); return 0; }