LoginSignup
0
0

More than 5 years have passed since last update.

ABC103-C Modulo Summation

Last updated at Posted at 2018-07-21

問題URL
$m\mod a_i$ の上界は $a_i - 1$
$m = a_1 \times a_2$ $\times ... \times$ $a_n - 1$ とすればこの値は $m\mod a_i$ の上界と一致する
よって、答えは $a_1 + a_2$ $+ ... +$ $a_N - N$ となる

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0