結果

問題 No.786 京都大学の過去問
ユーザー 抹茶アイス抹茶アイス
提出日時 2023-07-28 17:56:46
言語 C#
(.NET 8.0.203)
結果
WA  
実行時間 -
コード長 392 bytes
コンパイル時間 12,798 ms
コンパイル使用メモリ 166,676 KB
実行使用メモリ 183,508 KB
最終ジャッジ日時 2024-04-16 01:59:14
合計ジャッジ時間 8,319 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (108 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;

namespace yukicoder
{
    public class Program
    {
        public static void Main()
        {
            var n = double.Parse(Console.ReadLine())+1;
            var a = Math.Sqrt(5);
            var fn = 1 / a * (Math.Pow((1 + a) / 2, n) - Math.Pow((1 - a) / 2, n));
            Console.WriteLine(fn);
        }
    }
}
0