結果
| 問題 | No.657 テトラナッチ数列 Easy |
| コンテスト | |
| ユーザー |
horiesiniti
|
| 提出日時 | 2018-03-12 09:10:43 |
| 言語 | Ruby (4.0.2) |
| 結果 |
AC
|
| 実行時間 | 73 ms / 2,000 ms |
| コード長 | 250 bytes |
| 記録 | |
| コンパイル時間 | 105 ms |
| コンパイル使用メモリ | 9,088 KB |
| 実行使用メモリ | 15,360 KB |
| 最終ジャッジ日時 | 2026-05-07 06:45:28 |
| 合計ジャッジ時間 | 2,462 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 |
コンパイルメッセージ
Main.rb:2: warning: assigned but unused variable - no Syntax OK
ソースコード
hs={}
no=2
ts=[]
ts<<0
ts<<0
ts<<0
t1=0
t2=0
t3=0
t4=1
while hs.key?([t1,t2,t3,t4])==false
ts<<t4
hs[[t1,t2,t3,t4]]=0
n=t4+t3+t2+t1
t1=t2%17
t2=t3%17
t3=t4%17
t4=n%17
end
ts.pop
ts.pop
ts.pop
gets.to_i.times{
puts ts[(gets.to_i-1)%ts.size]
}
horiesiniti