<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>yuheiomori0718</author_name>
  <author_url>https://blog.hatena.ne.jp/yuheiomori0718/</author_url>
  <blog_title>メモ置き場</blog_title>
  <blog_url>https://y0m0r.hateblo.jp/</blog_url>
  <categories>
    <anon>python</anon>
  </categories>
  <description>N文字の文字列sが与えられ、N文字の文字列Tを作ります。はじめはTは長さ0の文字列で次のいずれかの操作が行えます。 ・Sの先頭を1文字削除し、Tの末尾に追加する ・Sの末尾を1文字削除し、Tの末尾に追加する 辞書順比較ができるだけ小さくなるようにTを作ってください。 pythonで書いてみたら文字列のスライスを多用する結果になった # coding=utf-8 def best_cow_line(s): T = [] while(s): if s &lt;= s[::-1]: T.append(s[0]) s = s[1:] else: T.append(s[-1:]) s = s[:-1] ret…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fy0m0r.hateblo.jp%2Fentry%2F20121210%2F1355150893&quot; title=&quot;PythonでBest Cow Line - メモ置き場&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-12-10 23:48:13</published>
  <title>PythonでBest Cow Line</title>
  <type>rich</type>
  <url>https://y0m0r.hateblo.jp/entry/20121210/1355150893</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
