2019-09-01から1日間の記事一覧

TTPC 2019 L. 多項式の零点の個数

https://atcoder.jp/contests/ttpc2019/tasks/ttpc2019_l?lang=jaSince $(x \bmod 10^K) = 0 \iff (x \bmod 2^K) = 0 \land (x \bmod 5^K) = 0$, we can use brute-force. I got TLE when using non-constexpr mod. #include <bits/stdc++.h> #define rep(i, n) for (int i </bits/stdc++.h>…