結果
問題 |
No.657 テトラナッチ数列 Easy
|
ユーザー |
|
提出日時 | 2018-03-04 08:52:02 |
言語 | Python2 (2.7.18) |
結果 |
TLE
|
実行時間 | - |
コード長 | 213 bytes |
コンパイル時間 | 49 ms |
コンパイル使用メモリ | 6,940 KB |
実行使用メモリ | 14,704 KB |
最終ジャッジ日時 | 2024-07-06 12:50:22 |
合計ジャッジ時間 | 5,007 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 TLE * 1 -- * 5 |
ソースコード
#yuki657 def tet(x): t=[0,0,0,1] for i in xrange(5,x+1): t+=[((t[-1]+t[-2]+t[-3]+t[-4])%17)] return t q=int(raw_input()) for i in xrange(q): n=int(raw_input()) if n<4: print 0 else: print tet(n)[-1]