<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>takehikom</author_name>
  <author_url>https://blog.hatena.ne.jp/takehikom/</author_url>
  <blog_title>わさっきhb</blog_title>
  <blog_url>https://takehikom.hateblo.jp/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>いきなりですが問題です． 引数(文字列)を一つとり，その文字を並べ替えてできる文字列(引数自身を含む)が何通りあるかを求めるプログラムを作りなさい． 順列の問題ですので，まずは順列 - Wikipediaを見ます．「重複を許す場合」の中に，分母が階乗の積で，分子が一つの階乗になっている式があり，これが使えそうです．例を出すと，もとの文字列が wakayama だったら，w, a, k, y, mの各文字から，aのみ4個，それ以外は1個ずつ使ってできる文字列なので，となります． 階乗を再帰呼び出しで求めるのは，好きではありません．しかし，whileループ*1というのも泥臭いです．そういえば，En…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakehikom.hateblo.jp%2Fentry%2F20080313%2F1205355908&quot; title=&quot; 順列の総数を求める - わさっきhb&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>2008-03-13 06:05:08</published>
  <title> 順列の総数を求める</title>
  <type>rich</type>
  <url>https://takehikom.hateblo.jp/entry/20080313/1205355908</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
