Submission #3417127
Source Code Expand
using System; using System.Collections.Generic; using System.Linq; using System.Text; class Program { static void Main(string[] args) { // 入力 int iN = int.Parse(Console.ReadLine().Trim()); System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch(); sw.Start(); // 解析 List<long> lstLuc = new List<long>(); lstLuc.Add(2); lstLuc.Add(1); for (int i = 2; i <= iN; i++) { lstLuc.Add(lstLuc[i - 2] + lstLuc[i - 1]); } // 出力 Console.WriteLine("{0}", lstLuc[iN].ToString().Trim()); sw.Stop(); #if DEBUG Console.WriteLine(); Console.WriteLine("{0}", sw.Elapsed.ToString()); Console.WriteLine("続行するには何かキーを押してください..."); Console.ReadKey(); #endif } }
Submission Info
Submission Time | |
---|---|
Task | B - Lucas Number |
User | starlightsheep |
Language | C# (Mono 4.6.2.0) |
Score | 200 |
Code Size | 986 Byte |
Status | AC |
Exec Time | 24 ms |
Memory | 13268 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt |
All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, sample_01.txt, sample_02.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01.txt | AC | 24 ms | 13268 KB |
02.txt | AC | 23 ms | 9172 KB |
03.txt | AC | 23 ms | 11220 KB |
04.txt | AC | 23 ms | 11220 KB |
05.txt | AC | 23 ms | 11220 KB |
06.txt | AC | 23 ms | 13268 KB |
07.txt | AC | 24 ms | 13268 KB |
08.txt | AC | 23 ms | 13268 KB |
09.txt | AC | 22 ms | 11220 KB |
10.txt | AC | 22 ms | 11220 KB |
11.txt | AC | 23 ms | 13268 KB |
12.txt | AC | 23 ms | 13268 KB |
13.txt | AC | 22 ms | 11220 KB |
14.txt | AC | 23 ms | 13268 KB |
sample_01.txt | AC | 23 ms | 11220 KB |
sample_02.txt | AC | 23 ms | 13268 KB |