結果

問題 No.954 Result
ユーザー keymoonkeymoon
提出日時 2021-02-02 03:22:20
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 70 ms / 2,000 ms
コード長 796 bytes
コンパイル時間 2,913 ms
コンパイル使用メモリ 104,636 KB
実行使用メモリ 24,160 KB
最終ジャッジ日時 2023-09-12 10:59:52
合計ジャッジ時間 6,978 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
21,944 KB
testcase_01 AC 68 ms
24,160 KB
testcase_02 AC 70 ms
23,844 KB
testcase_03 AC 67 ms
21,872 KB
testcase_04 AC 69 ms
22,016 KB
testcase_05 AC 67 ms
22,000 KB
testcase_06 AC 69 ms
21,912 KB
testcase_07 AC 68 ms
21,868 KB
testcase_08 AC 67 ms
21,952 KB
testcase_09 AC 67 ms
21,948 KB
testcase_10 AC 67 ms
23,972 KB
testcase_11 AC 68 ms
21,956 KB
testcase_12 AC 68 ms
22,000 KB
testcase_13 AC 67 ms
23,948 KB
testcase_14 AC 67 ms
22,068 KB
testcase_15 AC 69 ms
24,008 KB
testcase_16 AC 68 ms
21,856 KB
testcase_17 AC 67 ms
24,060 KB
testcase_18 AC 68 ms
23,980 KB
testcase_19 AC 68 ms
21,964 KB
testcase_20 AC 68 ms
21,996 KB
testcase_21 AC 67 ms
21,900 KB
testcase_22 AC 67 ms
21,964 KB
testcase_23 AC 67 ms
21,988 KB
testcase_24 AC 66 ms
21,980 KB
testcase_25 AC 67 ms
20,016 KB
testcase_26 AC 68 ms
24,004 KB
testcase_27 AC 69 ms
22,020 KB
testcase_28 AC 68 ms
22,060 KB
testcase_29 AC 68 ms
22,000 KB
testcase_30 AC 69 ms
22,012 KB
testcase_31 AC 67 ms
23,836 KB
testcase_32 AC 67 ms
21,952 KB
testcase_33 AC 68 ms
24,008 KB
testcase_34 AC 68 ms
23,936 KB
testcase_35 AC 68 ms
21,996 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static System.Math;
public static class P
{
    public static void Main()
    {
        List<long> fibs = new List<long>() { 1, 1 };
        while (fibs.Last() <= 1e17) fibs.Add(fibs[fibs.Count - 2] + fibs[fibs.Count - 1]);
        var a = Enumerable.Repeat(0, 5).Select(_ => long.Parse(Console.ReadLine())).Reverse().ToArray();
        var seq = fibs.SkipWhile(x => x != a[0]).ToArray();
        if (a[0] == 1 && a[1] != 1) seq = seq.Skip(1).ToArray();
        Console.WriteLine(a.Zip(seq, (x, y) => x == y).TakeWhile(x => x).Count());
    }
}
0