結果
| 問題 | No.89 どんどんドーナツどーんといこう! |
| コンテスト | |
| ユーザー |
TLwiegehtt
|
| 提出日時 | 2015-07-07 06:27:35 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 238 bytes |
| 記録 | |
| コンパイル時間 | 175 ms |
| コンパイル使用メモリ | 21,120 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-05 22:37:42 |
| 合計ジャッジ時間 | 821 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%d", &c);
| ^~~~~~~~~~~~~~~
main.c:8:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%d %d", &a, &b);
| ^~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#define PI (3.141592653589793)
int main(void){
int a,b,c;
double volume = 0.0;
scanf("%d", &c);
scanf("%d %d", &a, &b);
volume = (1.0*(a+b)*(b-a)*(b-a)*PI*PI)/4.0;
printf("%f\n", volume*(1.0*c));
return 0;
}
TLwiegehtt