結果
問題 | No.786 京都大学の過去問 |
ユーザー | 抹茶アイス |
提出日時 | 2023-07-28 17:58:25 |
言語 | C# (.NET 8.0.203) |
結果 |
AC
|
実行時間 | 64 ms / 2,000 ms |
コード長 | 404 bytes |
コンパイル時間 | 9,626 ms |
コンパイル使用メモリ | 165,544 KB |
実行使用メモリ | 182,900 KB |
最終ジャッジ日時 | 2024-04-16 02:00:25 |
合計ジャッジ時間 | 10,519 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 63 ms
29,184 KB |
testcase_01 | AC | 64 ms
29,056 KB |
testcase_02 | AC | 63 ms
29,312 KB |
testcase_03 | AC | 63 ms
29,568 KB |
testcase_04 | AC | 63 ms
182,900 KB |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (97 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/
ソースコード
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(Math.Round(fn)); } } }