<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ke_takahashi</author_name>
  <author_url>https://blog.hatena.ne.jp/ke_takahashi/</author_url>
  <blog_title>memorandums</blog_title>
  <blog_url>https://memorandums.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>お題AとBの科目の履修者リスト（学籍番号）があります。AとBを両方とも履修している人数をカウントしたいです。Rubyで書いてみた（a.rb）d = {} open ARGV[0] do |f| f.each_line do |l| l.chomp! d[l] ||= 0 d[l] += 1 end end d.select! {|k, v| v&gt;1}準備と実行AとBの履修者の学籍番号を連結したテキストファイル（data）を用意しておきます。あとは、上記のコードを入力して、以下のように実行します。ruby a.rb data人類総プログラマー計画というお題（！？）がありましたが、小学校でプログラ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmemorandums.hatenablog.com%2Fentry%2F2021%2F09%2F22%2F130806&quot; title=&quot;重複件数をカウントするRubyスクリプト - memorandums&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>2021-09-22 13:08:06</published>
  <title>重複件数をカウントするRubyスクリプト</title>
  <type>rich</type>
  <url>https://memorandums.hatenablog.com/entry/2021/09/22/130806</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
