結果
| 問題 |
No.786 京都大学の過去問
|
| コンテスト | |
| ユーザー |
kekurema
|
| 提出日時 | 2019-03-18 16:25:34 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 480 bytes |
| コンパイル時間 | 3,309 ms |
| コンパイル使用メモリ | 107,840 KB |
| 実行使用メモリ | 30,960 KB |
| 最終ジャッジ日時 | 2024-07-18 10:56:57 |
| 合計ジャッジ時間 | 7,415 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 TLE * 2 -- * 1 |
コンパイルメッセージ
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());
Console.WriteLine(f(N));
}
static public int f(int N)
{
if (N == 1) return 1;
if (N == 2) return 2;
return f(N - 2) + f(N - 1);
}
}
}
kekurema