/* author: Maksim1744 created: 07.03.2022 13:26:02 */ #include "bits/stdc++.h" using namespace std; const int mod = 998244353; mt19937_64 rng(123456); long long rnd (long long l, long long r) { return (long long)(rng() % (r - l + 1)) + l; } int main() { vector<int> f = {1}; for (int i = 1; i <= 2e5 + 20; ++i) f.push_back(f.back() * 1ll * i % mod); long long its = 0; auto start_time = clock(); while (true) { int a = rnd(1, 1e5); int b = rnd(1, 1e5); if ((++its) % 1000000 == 0) { auto delta = (double)(clock() - start_time) / CLOCKS_PER_SEC; cerr << fixed << setprecision(3) << '\r'; cerr << its << ' ' << delta << ' ' << delta / its * 1e9; } if (f[a] * 1ll * f[b] % mod == f[a + b]) { cerr << endl; cout << a << ' ' << b << endl; break; } } return 0; }
Standard input is empty
Standard output is empty
1000000 0.027 26.582 2000000 0.053 26.601 3000000 0.081 26.869 4000000 0.106 26.606 5000000 0.133 26.547 6000000 0.159 26.444 7000000 0.184 26.352 8000000 0.210 26.281 9000000 0.236 26.257 10000000 0.263 26.276 11000000 0.296 26.913 12000000 0.326 27.156 13000000 0.352 27.043 14000000 0.377 26.946 15000000 0.403 26.868 16000000 0.429 26.794 17000000 0.454 26.728 18000000 0.480 26.690 19000000 0.507 26.666 20000000 0.532 26.624 21000000 0.558 26.593 22000000 0.584 26.557 23000000 0.611 26.544 24000000 0.641 26.717 25000000 0.674 26.951 26000000 0.700 26.935 27000000 0.726 26.893 28000000 0.752 26.863 29000000 0.778 26.827 30000000 0.804 26.798 31000000 0.830 26.770 32000000 0.856 26.745 33000000 0.882 26.716 34000000 0.907 26.688 35000000 0.933 26.664 36000000 0.959 26.647 37000000 0.986 26.644 38000000 1.017 26.761 39000000 1.049 26.903 40000000 1.077 26.913 41000000 1.102 26.886 42000000 1.129 26.871 43000000 1.154 26.846 44000000 1.180 26.818 45000000 1.206 26.802 46000000 1.232 26.779 47000000 1.257 26.754 48000000 1.284 26.740 49000000 1.309 26.721 50000000 1.335 26.703 51000000 1.361 26.694 52000000 1.393 26.784 53000000 1.425 26.886 54000000 1.451 26.869 55000000 1.477 26.850 56000000 1.503 26.832 57000000 1.528 26.813 58000000 1.554 26.796 59000000 1.580 26.781 60000000 1.606 26.765 61000000 1.632 26.749 62000000 1.658 26.734 63000000 1.683 26.718 64000000 1.709 26.701 65000000 1.735 26.693 66000000 1.766 26.754 67000000 1.799 26.845 68000000 1.825 26.831 69000000 1.850 26.817 70000000 1.876 26.802 71000000 1.902 26.788 72000000 1.928 26.775 73000000 1.954 26.762 74000000 1.979 26.749 75000000 2.005 26.736 76000000 2.031 26.724 77000000 2.057 26.713 78000000 2.083 26.702 79000000 2.110 26.713 80000000 2.142 26.779 81000000 2.175 26.853 82000000 2.201 26.842 83000000 2.227 26.829 84000000 2.253 26.818 85000000 2.279 26.808 86000000 2.304 26.796 87000000 2.330 26.785 88000000 2.356 26.774 89000000 2.382 26.763 90000000 2.408 26.752 91000000 2.434 26.744 92000000 2.460 26.735 93000000 2.486 26.727 94000000 2.517 26.780 95000000 2.549 26.828 96000000 2.574 26.817 97000000 2.600 26.806 98000000 2.626 26.798 99000000 2.652 26.789 100000000 2.678 26.779 101000000 2.704 26.770 102000000 2.730 26.760 103000000 2.755 26.750 104000000 2.781 26.741 105000000 2.807 26.732 106000000 2.833 26.723 107000000 2.859 26.720 108000000 2.891 26.767 109000000 2.922 26.804 110000000 2.948 26.797 111000000 2.973 26.788 112000000 2.999 26.781 113000000 3.025 26.772 114000000 3.051 26.763 115000000 3.077 26.755 116000000 3.103 26.746 117000000 3.131 26.760 118000000 3.157 26.753 119000000 3.183 26.745 120000000 3.209 26.745 121000000 3.240 26.780 122000000 3.274 26.833 123000000 3.300 26.825 124000000 3.326 26.821 125000000 3.352 26.815 126000000 3.378 26.807 127000000 3.403 26.799 128000000 3.429 26.792 129000000 3.455 26.784 130000000 3.481 26.777 131000000 3.507 26.769 132000000 3.533 26.761 133000000 3.558 26.753 134000000 3.585 26.751 135000000 3.617 26.792 136000000 3.649 26.832 137000000 3.675 26.825 138000000 3.702 26.824 139000000 3.728 26.818 140000000 3.754 26.812 141000000 3.780 26.805 142000000 3.805 26.799 143000000 3.831 26.794 144000000 3.858 26.789 145000000 3.883 26.783 146000000 3.909 26.776 147000000 3.935 26.771 148000000 3.962 26.767 149000000 3.994 26.806 150000000 4.026 26.838 151000000 4.052 26.837 152000000 4.079 26.833 153000000 4.104 26.826 154000000 4.130 26.820 155000000 4.156 26.813 156000000 4.185 26.829 157000000 4.211 26.824 158000000 4.237 26.820 159000000 4.263 26.814 160000000 4.289 26.807 161000000 4.316 26.804 162000000 4.341 26.799 163000000 4.375 26.843 164000000 4.406 26.864 165000000 4.432 26.863 166000000 4.460 26.865 167000000 4.485 26.859 168000000 4.511 26.854 169000000 4.538 26.853 170000000 4.564 26.848 171000000 4.590 26.843 172000000 4.616 26.839 173000000 4.642 26.834 174000000 4.668 26.829 175000000 4.695 26.826 176000000 4.722 26.829 177000000 4.757 26.876 178000000 4.785 26.882 179000000 4.812 26.880 180000000 4.837 26.875 181000000 4.863 26.869 182000000 4.889 26.863 183000000 4.915 26.859 184000000 4.941 26.853 185000000 4.967 26.849