压8位乘法加和不立即进位会炸long long。
#include<bits/stdc++.h> using namespace std; int main() { freopen("in.txt" , "w" , stdout); string s1(10000 , '9'); cout << s1 << '\n' << s1; return 0; }
这篇题解 被叉了,顺带一提,最优解也挂了。