結果
問題 | No.89 どんどんドーナツどーんといこう! |
ユーザー |
|
提出日時 | 2016-04-16 20:36:52 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 29 ms / 5,000 ms |
コード長 | 529 bytes |
コンパイル時間 | 2,556 ms |
コンパイル使用メモリ | 111,124 KB |
実行使用メモリ | 19,712 KB |
最終ジャッジ日時 | 2024-10-05 22:53:57 |
合計ジャッジ時間 | 1,888 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;using System.Linq;public class Program {public static void Main() {int cal = int.Parse(Console.ReadLine());int[] rad = Array.ConvertAll(Console.ReadLine().Split(), value => int.Parse(value)); //内径、外径double csRad = (rad[1]-rad[0])/2.0; //断面の半径double PI = 3.14159265358979323846264338327950288;double surface = csRad * csRad * PI; //断面積double v = surface * rad.Sum()*PI; //体積Console.WriteLine(v * cal);}}