結果
問題 | No.89 どんどんドーナツどーんといこう! |
ユーザー |
![]() |
提出日時 | 2015-08-18 21:55:16 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 25 ms / 5,000 ms |
コード長 | 1,416 bytes |
コンパイル時間 | 673 ms |
コンパイル使用メモリ | 103,552 KB |
実行使用メモリ | 18,944 KB |
最終ジャッジ日時 | 2024-10-05 22:39:35 |
合計ジャッジ時間 | 1,415 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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.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; } } }