結果
問題 |
No.89 どんどんドーナツどーんといこう!
|
ユーザー |
![]() |
提出日時 | 2025-03-05 17:45:40 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 321 bytes |
コンパイル時間 | 608 ms |
コンパイル使用メモリ | 24,960 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2025-03-05 17:45:42 |
合計ジャッジ時間 | 1,523 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:6:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d%d%d", &cal, &Rin, &Rout); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(){ int cal, Rin, Rout; double pi = 3.14159265359, Rmid, Rcir, height, area; scanf("%d%d%d", &cal, &Rin, &Rout); Rmid = (Rin + Rout)/2.0; height = Rmid * 2 * pi; Rcir = Rout - Rmid; area = Rcir * Rcir * pi; printf("%lf\n", area * height * cal); return 0; }