<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>baitop</author_name>
  <author_url>https://blog.hatena.ne.jp/baitop/</author_url>
  <blog_title>バイトの競プロメモ</blog_title>
  <blog_url>https://baitop.hatenadiary.jp/</blog_url>
  <categories>
    <anon>桁DP</anon>
  </categories>
  <description>問題概略 A~Bの中で4か9が含まれる物の個数を答えよ。制約 A,B 解法 4か9が一つでも含まれてればいいなら包除原理使うか！と思ったけど、大変そうなので桁DPで解いた。 まとめ上げるのに必要な条件は 何桁目を見ているか 数が上限ギリギリかどうか すでに4,9を使っているか の3つとしてメモ化再帰で解いた。 public static void solve() throws Exception { //longを忘れるなオーバーフローするぞ A = nl(); B = nl(); System.out.println(task(B) - task(A - 1)); } public stat…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbaitop.hatenadiary.jp%2Fentry%2F2018%2F08%2F28%2F185348&quot; title=&quot;D - 禁止された数字　　AtCoder Beginner Contest 007 - バイトの競プロメモ&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>2018-08-28 18:53:48</published>
  <title>D - 禁止された数字　　AtCoder Beginner Contest 007</title>
  <type>rich</type>
  <url>https://baitop.hatenadiary.jp/entry/2018/08/28/185348</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
