結果

問題 No.1469 programing
ユーザー tamura2004tamura2004
提出日時 2021-06-26 20:50:47
言語 Crystal
(1.11.2)
結果
AC  
実行時間 116 ms / 3,000 ms
コード長 121 bytes
コンパイル時間 13,069 ms
コンパイル使用メモリ 294,960 KB
実行使用メモリ 80,384 KB
最終ジャッジ日時 2024-06-25 09:40:22
合計ジャッジ時間 12,609 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 5 ms
5,376 KB
testcase_09 AC 6 ms
5,376 KB
testcase_10 AC 6 ms
5,376 KB
testcase_11 AC 9 ms
6,784 KB
testcase_12 AC 8 ms
6,400 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 AC 13 ms
9,088 KB
testcase_15 AC 9 ms
6,144 KB
testcase_16 AC 12 ms
9,660 KB
testcase_17 AC 116 ms
80,384 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