File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 11/**
22 * @verified
33 * <ul>
4- * <li> https://atcoder.jp/contests/arc050/tasks/arc050_c </li>
5- * <li> https://atcoder.jp/contests/abc129/tasks/abc129_f </li>
6- * <li> https://atcoder.jp/contests/arc012/tasks/arc012_4 </li>
4+ * <li> https://atcoder.jp/contests/m-solutions2019/tasks/m_solutions2019_c : (M = 1000000007)
5+ * <li> https://atcoder.jp/contests/abc172/tasks/abc172_e : (M = 1000000007)
6+ * <li> https://atcoder.jp/contests/abc129/tasks/abc129_f : (2 <= M <= 1000000000)
7+ * <li> https://atcoder.jp/contests/arc050/tasks/arc050_c : (2 <= M <= 1000000000)
8+ * <li> https://atcoder.jp/contests/arc012/tasks/arc012_4 : (1 <= M <= 1000000007)
79 * </ul>
810 */
911class ModIntFactory {
@@ -192,6 +194,7 @@ int div(int a, int b) {
192194 }
193195 int inv (int a ) {
194196 int b = mod ();
197+ if (b == 1 ) return 0 ;
195198 long u = 1 , v = 0 ;
196199 while (b >= 1 ) {
197200 int t = a / b ;
You can’t perform that action at this time.
0 commit comments