結果

問題 No.1076 寿司打
ユーザー bluemeganebluemegane
提出日時 2020-06-13 07:18:48
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 61 ms / 2,000 ms
コード長 362 bytes
コンパイル時間 762 ms
コンパイル使用メモリ 61,216 KB
実行使用メモリ 24,624 KB
最終ジャッジ日時 2023-09-06 22:34:54
合計ジャッジ時間 2,223 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
22,512 KB
testcase_01 AC 59 ms
20,656 KB
testcase_02 AC 55 ms
20,636 KB
testcase_03 AC 59 ms
22,572 KB
testcase_04 AC 59 ms
24,572 KB
testcase_05 AC 59 ms
22,560 KB
testcase_06 AC 59 ms
22,540 KB
testcase_07 AC 61 ms
22,604 KB
testcase_08 AC 61 ms
22,600 KB
testcase_09 AC 59 ms
20,648 KB
testcase_10 AC 60 ms
22,736 KB
testcase_11 AC 60 ms
24,624 KB
testcase_12 AC 59 ms
22,704 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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;
        }
        Console.WriteLine(res);
    exit:;
    }
}
0