結果
問題 |
No.89 どんどんドーナツどーんといこう!
|
ユーザー |
![]() |
提出日時 | 2016-02-25 00:02:56 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 275 bytes |
コンパイル時間 | 99 ms |
コンパイル使用メモリ | 22,784 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-22 13:25:19 |
合計ジャッジ時間 | 607 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 2 WA * 7 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:15:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘double’ [-Wformat=] 15 | printf("%d\n",ans); | ~^ ~~~ | | | | int double | %f main.c:11:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 11 | scanf("%d %d %d",&c,&Rin,&Rout); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> #include<math.h> int main() { int c; int Rin; int Rout; double ans; scanf("%d %d %d",&c,&Rin,&Rout); //(π*Rout*Rou)*(Rin+Rout/2)*c; ans =(M_PI+(double)Rout*(double)Rout)*((double)Rin+(double)Rout/2)*c; printf("%d\n",ans); return 0; }