matsueushi

AtCoder diverta 2019 Programming Contest D - DivRem Number

競プロ    AtCoder
2022-6-11 19:45

https://atcoder.jp/contests/diverta2019/tasks/diverta2019_d

\(t = \lfloor n/m\rfloor = n \mod m\) とおくと \(0 \le t < m\)であり、\(n=\alpha m + t\) とおける。 \(t\) の条件から \(\alpha = \lfloor n/m\rfloor = t\) だから結局 \(n = t(m+1)\) とかける。

\(n = t(m+1) \ge t^2\) より、\(t \le \sqrt{n}\) を探索すれば良い。

https://atcoder.jp/contests/diverta2019/submissions/32371542

  • Home
  • Blog
  • BOaT
  • NATSUMEN
  • Playlist
  • Other
  • AtCoder
  • Categories
  • Tags
  • Search
  • About
Copyright © 2019–2025
Built with Hugo and theme Tokiwa. 90 words in this page.

AtCoder APC 001 B - Two Arrays AtCoder ABC 255 E - Lucky Numbers
Related AtCoder APC 001 B - Two Arrays  /  AtCoder ABC 198 D - Send More Money  /  AtCoder ABC 129 D - Lamp  /  AtCoder ABC 153 E - Crested Ibis vs Monster  /  AtCoder ABC 161 D - Lunlun Number  /  AtCoder CODE FESTIVAL 2017 qualC C - Inserting 'x'  /  AtCoder ABC 034 A - Kenken Race  /  AtCoder AGC 011 B - Colorful Creatures  /  AtCoder ABC 134 D - Preparing Boxes  /  AtCoder ABC 064 D - Insertion  /  AtCoder ABC 133 D - Rain Flows into Dams  /  AtCoder ABC 094 C - Many Medians  /  AtCoder ABC 183 E - Queen on Grid  /  AtCoder ABC 130 C - Rectangle Cutting  /  AtCoder DISCO presents ディスカバリーチャンネル コードコンテスト2020 予選 C - Strawberry Cakes

comments powered by Disqus