結果

問題 No.1469 programing
ユーザー tamura2004tamura2004
提出日時 2021-06-26 20:50:47
言語 Crystal
(1.11.2)
結果
AC  
実行時間 90 ms / 3,000 ms
コード長 121 bytes
コンパイル時間 17,609 ms
コンパイル使用メモリ 254,576 KB
実行使用メモリ 66,224 KB
最終ジャッジ日時 2023-09-07 15:40:59
合計ジャッジ時間 19,032 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,448 KB
testcase_01 AC 2 ms
4,480 KB
testcase_02 AC 3 ms
4,456 KB
testcase_03 AC 2 ms
4,540 KB
testcase_04 AC 2 ms
4,628 KB
testcase_05 AC 3 ms
4,516 KB
testcase_06 AC 3 ms
4,480 KB
testcase_07 AC 3 ms
4,576 KB
testcase_08 AC 6 ms
6,252 KB
testcase_09 AC 7 ms
6,284 KB
testcase_10 AC 7 ms
6,556 KB
testcase_11 AC 10 ms
8,992 KB
testcase_12 AC 8 ms
8,228 KB
testcase_13 AC 3 ms
4,432 KB
testcase_14 AC 12 ms
10,668 KB
testcase_15 AC 9 ms
7,788 KB
testcase_16 AC 14 ms
12,624 KB
testcase_17 AC 90 ms
66,224 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

s = gets.to_s.chars
ans = [] of Char
s.each do |c|
  if ans.empty? || ans[-1] != c
    ans << c
  end
end

puts ans.join
0