結果

問題 No.1076 寿司打
ユーザー bluemeganebluemegane
提出日時 2020-06-13 07:17:46
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 458 bytes
コンパイル時間 2,407 ms
コンパイル使用メモリ 62,956 KB
実行使用メモリ 26,784 KB
最終ジャッジ日時 2023-09-06 22:31:58
合計ジャッジ時間 2,474 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
22,536 KB
testcase_01 AC 63 ms
22,688 KB
testcase_02 AC 57 ms
22,696 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

using static System.Math;
using System;

public class Hello
{
    static void Main()
    {
        var p = double.Parse(Console.ReadLine().Trim());
        if (p == 0) { Console.WriteLine(0); goto exit; }
        var r = 1d;
        var res = 0d;
        while (r > 0.00001)
        {
            r *= p;
            res += r;
        }
        var result = Round(res, 1, MidpointRounding.AwayFromZero);
        Console.WriteLine(result);
    exit:;
    }
}
0