- P2's solution
-
P2's Solution
- @ 2025-10-22 23:36:14
由于增加了换行符,所以只需要在读入字符串后删去最后一个字符即可。
#include<bits/stdc++.h>
using namespace std;
int main()
{
freopen("log.in","r",stdin);
freopen("log.out","w",stdout);
string s;
cin>>s;
s.erase(s.end());
cout<<s.size();
}
是运行时间最多的……