結果
問題 | No.89 どんどんドーナツどーんといこう! |
ユーザー |
|
提出日時 | 2014-12-09 22:35:03 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 260 bytes |
コンパイル時間 | 181 ms |
コンパイル使用メモリ | 22,912 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-05 22:23:46 |
合計ジャッジ時間 | 826 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:10:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%d",&c); | ^~~~~~~~~~~~~~ main.c:11:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 11 | scanf("%d %d",&ri,&ro); | ^~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>#include <math.h>#define square(x) ((x)*(x))int main(void){int c,ro,ri;double cal=0;scanf("%d",&c);scanf("%d %d",&ri,&ro);cal=c*2.0*M_PI*(ro+ri)/2.0*M_PI*square((ro-ri)/2.0);printf("%f",cal);return 0;}