結果
| 問題 |
No.89 どんどんドーナツどーんといこう!
|
| コンテスト | |
| ユーザー |
shialt
|
| 提出日時 | 2014-12-10 22:18:43 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 248 bytes |
| コンパイル時間 | 557 ms |
| コンパイル使用メモリ | 55,360 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-11 20:33:25 |
| 合計ジャッジ時間 | 1,380 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 1 WA * 8 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:17: warning: format ‘%f’ expects argument of type ‘float*’, but argument 2 has type ‘int*’ [-Wformat=]
6 | scanf("%f", &C);
| ~^ ~~
| | |
| | int*
| float*
| %d
main.cpp:7:17: warning: format ‘%f’ expects argument of type ‘float*’, but argument 2 has type ‘int*’ [-Wformat=]
7 | scanf("%f", &in);
| ~^ ~~~
| | |
| | int*
| float*
| %d
main.cpp:8:17: warning: format ‘%f’ expects argument of type ‘float*’, but argument 2 has type ‘int*’ [-Wformat=]
8 | scanf("%f", &out);
| ~^ ~~~~
| | |
| | int*
| float*
| %d
main.cpp:6:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%f", &C);
| ~~~~~^~~~~~~~~~
main.cpp:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%f", &in);
| ~~~~~^~~~~~~~~~~
main.cpp:8:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%f", &out);
| ~~~~~^~~~~~~~~~~~
ソースコード
#include <iostream>
int main(void)
{
int C, in, out;
scanf("%f", &C);
scanf("%f", &in);
scanf("%f", &out);
printf("%f\n", C * 2 * 3.14159 * (in + out) / 2 * 3.14159 * ((in + out) / 2 - in) * ((in + out) / 2 - in));
return 0;
}
shialt