众所周知,unsigned long long
的存储范围是 0\sim2^{64}-1,也就是 0\sim18446744073709551615,也就是大约 1.8\times10^{19},而题目中最大的数据为 4\times10^9,相乘也就 1.6\times10^{19}。很明显 1.6\times10^{19}<1.8\times10^{19}<18446744073709551615,所以用 unsigned long long
就能 AC,学了高精就不会用 unsigned long long
是吧