結果
問題 |
No.786 京都大学の過去問
|
ユーザー |
![]() |
提出日時 | 2019-03-18 16:38:10 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 544 bytes |
コンパイル時間 | 970 ms |
コンパイル使用メモリ | 109,344 KB |
実行使用メモリ | 17,920 KB |
最終ジャッジ日時 | 2024-07-18 11:12:48 |
合計ジャッジ時間 | 1,246 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 WA * 2 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace contest { class Program { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); int[] array = new int[50]; array[0] = 1; array[1] = 2; for (int i = 2; i < N; i++) { array[i] = array[i - 2] + array[i - 1]; } Console.WriteLine(array[N - 1]); } } }