結果

問題 No.89 どんどんドーナツどーんといこう!
ユーザー popoyansyopopoyansyo
提出日時 2015-08-18 21:55:16
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 25 ms / 5,000 ms
コード長 1,416 bytes
コンパイル時間 725 ms
コンパイル使用メモリ 104,064 KB
実行使用メモリ 18,944 KB
最終ジャッジ日時 2024-04-15 19:37:08
合計ジャッジ時間 1,492 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 22 ms
18,688 KB
testcase_01 AC 23 ms
18,944 KB
testcase_02 AC 22 ms
17,920 KB
testcase_03 AC 23 ms
18,816 KB
testcase_04 AC 23 ms
18,688 KB
testcase_05 AC 24 ms
18,688 KB
testcase_06 AC 23 ms
18,688 KB
testcase_07 AC 25 ms
18,688 KB
testcase_08 AC 23 ms
17,920 KB
testcase_09 AC 22 ms
18,048 KB
testcase_10 AC 23 ms
18,816 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            /*int a, b, c;
            a = int.Parse(Console.ReadLine()); //標準入力
            string[] str = Console.ReadLine().Split(' ');//2つ以上のスペース区切り入力の取得
            b = int.Parse(str[0]);  //数値で受け取りたい場合は変換する
            c = int.Parse(str[1]);
            Console.Write("改行なし a = {0} b = {1} c = {2}", a, b, c);//改行なし出力
            Console.WriteLine("改行あり a = {0} b = {1} c = {2}", a, b, c);//改行付き出力*/

            double cal;
            cal = double.Parse(Console.ReadLine());

            double rin, rout;
            string[] str = Console.ReadLine().Split(' ');
            rin = double.Parse(str[0]);
            rout = double.Parse(str[1]);
            Console.WriteLine(calcal(cal,rin,rout).ToString("0.0000000000"));
        }
        
        static double calcal(double cal,double rin,double rout)
        {
            double r = (rout - rin) / 2;
            double ro = r + rin;
            double r2p = (r * r) * Math.PI;
            double rrp = ro * 2 * Math.PI;

            return (r2p * rrp) * cal;
        }        
    }
}
0