結果
| 問題 | 
                            No.365 ジェンガソート
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2018-08-03 11:12:19 | 
| 言語 | Ruby  (3.4.1)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 168 bytes | 
| コンパイル時間 | 102 ms | 
| コンパイル使用メモリ | 7,552 KB | 
| 実行使用メモリ | 25,372 KB | 
| 最終ジャッジ日時 | 2024-09-19 17:19:55 | 
| 合計ジャッジ時間 | 6,085 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 17 TLE * 1 -- * 23 | 
コンパイルメッセージ
Syntax OK
ソースコード
n = gets.to_i num = gets.split.map(&:to_i) idx = n n += 1 while(idx != nil && idx != 0) do n -= 1 idx = num[0..idx-1].find_index(n) end n -= 1 if idx == 0 print n