結果
問題 | No.273 回文分解 |
ユーザー |
![]() |
提出日時 | 2015-11-15 07:29:19 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 95 ms / 2,000 ms |
コード長 | 408 bytes |
コンパイル時間 | 94 ms |
コンパイル使用メモリ | 7,680 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-06-25 13:33:00 |
合計ジャッジ時間 | 4,328 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 32 |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - mapping Syntax OK
ソースコード
mapping = Struct.new(:rmin, :rmax)str = gets.stripn = str.length(n - 2).downto(0) do |i|0.upto(n - i - 1) do |j|nstr = str[j, i + 1]find = false((i + 1) / 2).times do |k|if nstr[k] != nstr[i - k]find = truebreakendendif !findputs nstr.lengthexitendendend