結果

問題 No.1617 Palindrome Removal
ユーザー yuruhiyayuruhiya
提出日時 2021-07-22 21:28:26
言語 Crystal
(1.11.2)
結果
WA  
実行時間 -
コード長 130 bytes
コンパイル時間 22,236 ms
コンパイル使用メモリ 264,960 KB
実行使用メモリ 11,424 KB
最終ジャッジ日時 2023-09-24 15:39:36
合計ジャッジ時間 23,950 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
10,280 KB
testcase_01 AC 19 ms
10,668 KB
testcase_02 AC 21 ms
11,144 KB
testcase_03 AC 20 ms
11,004 KB
testcase_04 AC 22 ms
11,372 KB
testcase_05 AC 18 ms
10,440 KB
testcase_06 AC 28 ms
11,352 KB
testcase_07 AC 18 ms
9,148 KB
testcase_08 AC 2 ms
4,572 KB
testcase_09 AC 2 ms
4,532 KB
testcase_10 AC 26 ms
11,092 KB
testcase_11 AC 26 ms
10,504 KB
testcase_12 AC 27 ms
11,424 KB
testcase_13 AC 25 ms
11,372 KB
testcase_14 AC 3 ms
4,496 KB
testcase_15 AC 2 ms
4,380 KB
testcase_16 AC 3 ms
4,636 KB
testcase_17 AC 2 ms
4,460 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 3 ms
4,380 KB
testcase_21 AC 3 ms
4,416 KB
testcase_22 AC 3 ms
4,532 KB
testcase_23 AC 2 ms
4,512 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

s = read_line
if s.chars.uniq.size == 1
  puts s.size.odd? ? -1 : 0
elsif s == s.reverse
  puts s.size - 2
else
  puts s.size
end
0