<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>UGIS</author_name>
  <author_url>https://blog.hatena.ne.jp/UGIS/</author_url>
  <blog_title>ugisの活動記録</blog_title>
  <blog_url>https://ugis.hatenablog.jp/</blog_url>
  <categories>
    <anon>解説</anon>
  </categories>
  <description>A - Digit Sum 2 問題文 N 以下の正の整数の 10 進法での各桁の和の最大値を求めてください。 制約 1≤N≤1016 N は整数である 自力では分からなかったので、正解者のコードを見て考察。 Nの条件から、全探索は不可能。 ですが、そもそも探索する必要がありません。 何故かというとN以下の正の整数の各桁の和が最大になるときは必ず、 ・6999 ・9 ・89 ・2999 先頭、一番左の桁以外が９になるからです。 ０～９の整数の中で一番大きいのは９ですから当然ですね。 つまり、この問題は １.桁の数 - １ 回合計に９を足す ２.先頭の桁の数字を合計に足す という操作だけで十分そ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fugis.hatenablog.jp%2Fentry%2F2018%2F03%2F19%2F201438&quot; title=&quot;２.Atcoder Grand Contest21 Digit Sum 2 - ugisの活動記録&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-03-19 20:14:38</published>
  <title>２.Atcoder Grand Contest21 Digit Sum 2</title>
  <type>rich</type>
  <url>https://ugis.hatenablog.jp/entry/2018/03/19/201438</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
