<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>inamori</author_name>
  <author_url>https://blog.hatena.ne.jp/inamori/</author_url>
  <blog_title>inamori’s diary</blog_title>
  <blog_url>https://inamori.hateblo.jp/</blog_url>
  <categories>
  </categories>
  <description>https://atcoder.jp/contests/abc422/tasks/abc422_g1は簡単です。箱1のボールの個数がAの倍数の母関数は、 なので、3つの箱全体での母関数は、 分母は精々8項なので、O(N)でxNの項まで計算できます。2は1のようにはいきません。ボールを区別するので指数型の母関数にする必要があります。例えば5個のボールを箱1に3個、箱2に2個ボールを入れるとすると、5C2通りあります。これは、なのでx5の項はとなって、ボールを区別したときの場合の数が計算できます。 しかし、これはふつうに計算するとO(N2)なので無理です。 ただし、BCが大きいときは間に合います。…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Finamori.hateblo.jp%2Fentry%2F2025%2F11%2F15%2F194812&quot; title=&quot;AtCoder Beginner Contest 422 G - inamori’s diary&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>2025-11-15 19:48:12</published>
  <title>AtCoder Beginner Contest 422 G</title>
  <type>rich</type>
  <url>https://inamori.hateblo.jp/entry/2025/11/15/194812</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
