結果
問題 |
No.658 テトラナッチ数列 Hard
|
ユーザー |
![]() |
提出日時 | 2018-04-14 03:16:08 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 421 bytes |
コンパイル時間 | 2,441 ms |
コンパイル使用メモリ | 102,528 KB |
実行使用メモリ | 18,176 KB |
最終ジャッジ日時 | 2024-06-26 22:06:04 |
合計ジャッジ時間 | 2,359 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 RE * 1 |
other | AC * 4 RE * 4 |
コンパイルメッセージ
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 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]); } }