結果

問題 No.658 テトラナッチ数列 Hard
ユーザー iwkjoseciwkjosec
提出日時 2018-04-14 03:16:08
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 421 bytes
コンパイル時間 2,992 ms
コンパイル使用メモリ 101,064 KB
実行使用メモリ 22,524 KB
最終ジャッジ日時 2023-09-09 04:59:27
合計ジャッジ時間 3,648 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
18,748 KB
testcase_01 AC 55 ms
20,812 KB
testcase_02 RE -
testcase_03 AC 55 ms
20,816 KB
testcase_04 AC 100 ms
20,632 KB
testcase_05 AC 100 ms
20,640 KB
testcase_06 AC 99 ms
20,656 KB
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.Generic;
using System.Linq;
using static System.Console;

class Program
{
    static void Main()
    {
        var T = new int[4912];
        T[3] = 1;
        for (int i = 4; i < 4912; i++) T[i] = (T[i - 1] + T[i - 2] + T[i - 3] + T[i - 4]) % 17;
 
        var Q = int.Parse(ReadLine());
        for (int i = 0; i < Q; i++) WriteLine(T[(int.Parse(ReadLine()) - 1) % 4912]);
    }
}
0