I have noticed that educational rounds like to use mod 998244353 instead of mod 10^{9} + 7. Does anyone know the reason for this? One idea that comes to mind is since 998244353 < 10^{9} there might be opportunities to troll contestants by breaking division and forcing them to calculate things like mod 998244353. However I have yet to see this used in an educational round, although this idea was used to good effect in 272D - Dima and Two Sequences.

As far as I know, 998244353 allows you to do interesting stuff related to polynomial multiplication I haven't fully studied yet. See this CF tutorial and this note in Petr's blog.

Other times, 998244353 is used because it's prime, much like 10

^{9}+ 7, or 10^{9}+ 9, or 10^{6}+ 69. There can also be a mind-game factor involved: one time, I thought a problem needed the above tricks to be solved simply because the modulo was 998244353, but in the end, I was fooled!Why it appears often in educational rounds? I don't know, you'll have to ask the setters for that.

^{23}.This is nice because it lets you do Fast Fourier Transforms (mod p) using only the integers. In other words, the setters don't want to give away whether the problem is supposed to be done using FFT or not.

I think FFT can be done even with modulo 10

^{9}+ 7. You can do it by FFT with some large two modulos, for example, modulo 1 + 7·2^{26}and 1 + 5·2^{25}. Then you can restore the value using Chinese Remainder Theorem (or extended Euclidean algorithm). And finally modulo it by 10^{9}+ 7.Obviously, this way also works for 10

^{9}+ 9, 998244353, or some other modulos. But, if the modulo is 10^{9}+ 7, I think that some people may think "the solution is definitely not FFT" even if FFT is actually involved. Finally, I think taking modulo with 10^{9}+ 7 or 10^{9}+ 9 is the best way to hide the solution (whether FFT or not).Recently, problem setters found that giving every problem modulo 998244353 is the best way to hide the solution :( Now 998244353 doesn't mean anything. There are so many problems not using FFT but having modulo 998244353...

Sorry, I wasn't necessarily talking about polynomial multiplication: I agree you can do CRT to do polynomial multiplication mod 10

^{9}+ 7 say. 998244353 is special because you can actually do a fourier transform with a 2^{n}-th root of unity.Also, I would say that I also agree that it's just more convenient to have a template to do polynomial multiplication modulo

pfor any primep.I wonder what people will do if I invent an algorithm which only works on mod 696969420...

People won't do this problem since they will get the ultimate orgasm with the first glance.

Just imagine what will happen if people realize there were already some good problems about mod 2!!