Comments

But I used cin and passed it fastly.

What the ridiculous test in Div.1 C, if you don't take modulo in the end, you will print 998244353 and get fst. :(