結果
問題 | No.1076 寿司打 |
ユーザー |
![]() |
提出日時 | 2020-06-13 07:17:46 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 458 bytes |
コンパイル時間 | 860 ms |
コンパイル使用メモリ | 103,808 KB |
実行使用メモリ | 19,072 KB |
最終ジャッジ日時 | 2024-06-24 16:45:44 |
合計ジャッジ時間 | 1,852 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | WA * 10 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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:;}}