結果
問題 | No.89 どんどんドーナツどーんといこう! |
ユーザー |
|
提出日時 | 2017-05-22 23:54:25 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 407 bytes |
コンパイル時間 | 347 ms |
コンパイル使用メモリ | 30,976 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-05 23:14:29 |
合計ジャッジ時間 | 714 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 |
コンパイルメッセージ
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;}