cf/mirror

Speedbreaker Counting (Medium Version)

CF
2018F23000· legendary gm10s1024 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
11
1 998244353
2 998244353
3 998244353
4 998244353
5 998244353
6 998244353
7 998244353
8 998244353
9 998244353
10 102275857
10 999662017
Output
0 1
1 2 1
14 7 4 2
183 34 19 16 4
2624 209 112 120 48 12
42605 1546 793 992 468 216 36
785910 13327 6556 9190 4672 2880 864 144
16382863 130922 61939 94992 50100 36960 14256 4608 576
382823936 1441729 657784 1086596 583344 488700 216000 96480 23040 2880
20300780 17572114 7751377 13641280 7376068 6810552 3269700 1785600 576000 144000 14400
944100756 17572114 7751377 13641280 7376068 6810552 3269700 1785600 576000 144000 14400
2018F2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)