結果
問題 |
No.52 よくある文字列の問題
|
ユーザー |
|
提出日時 | 2016-10-20 01:37:30 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 179 bytes |
コンパイル時間 | 562 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,672 KB |
最終ジャッジ日時 | 2024-11-23 08:11:17 |
合計ジャッジ時間 | 2,715 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 WA * 7 |
コンパイルメッセージ
Syntax OK
ソースコード
s = gets.chomp! def solve(s) return [s] if s.length <= 1 [s] + solve(s[0..-2]).map{|si| s[-1] + si } \ + solve(s[1..-1]).map{|si| si + s[0] } end puts solve(s).uniq.size