0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

スミレ畑、やってみた。 その21

Posted at

概要

日本語プログラミング言語、スミレ畑、見つけたので、やってみた。
AtCoder、やってみた。
練習問題やってみた。

練習問題

ABC 049 C - Daydream
文字列Sが与えられ、始め空の文字列Tの末尾に "dream", "dreamer", "erase", "eraser"を追加する処理を行って、S=Tにできるか判定する問題です。

投入するソース

erasedream

期待値

YES

写真

image.png

サンプルコード

Sは,入力したもの
Sは,正規表現によって、Sを、「eraser」から、「!」に置換したもの
Sは,正規表現によって、Sを、「erase」から、「!」に置換したもの
Sは,正規表現によって、Sを、「dreamer」から、「!」に置換したもの
Sは,正規表現によって、Sを、「dream」から、「!」に置換したもの
Sは,正規表現によって、Sを、「!」から、「」に置換したもの
もし、S=「」ならば
  「YES」を、出力して改行する
そうでなければ
  「NO」を、出力して改行する
もし終わり

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?