結果
| 問題 | No.89 どんどんドーナツどーんといこう! |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2014-12-07 22:13:00 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 81 ms / 5,000 ms |
| コード長 | 267 bytes |
| 記録 | |
| コンパイル時間 | 41 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 12,160 KB |
| 最終ジャッジ日時 | 2024-10-05 22:22:55 |
| 合計ジャッジ時間 | 1,412 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 |
コンパイルメッセージ
Syntax OK
ソースコード
def donut_taiseki(r_in, r_out) r_in = r_in.to_f r_out = r_out.to_f r = (r_out - r_in) / 2 return Math::PI * r * r * (r_out + r_in) * Math::PI end c = gets.to_i r_in, r_out = gets.split.map(&:to_i) cal = donut_taiseki(r_in, r_out) * c puts cal