Mr_steamedbread @ 2020-08-12 22:00:32
求教,是不能用字符串做吗
WA 返回以下信息
Wrong Answer. wrong answer On line 1 column 1, read (ASCII 13), expected 5.
#include <bits/stdc++.h>
using namespace std;
int main()
{
string aa;
getline(cin,aa);
for(register int i=aa.length()-1;i>=0;i--)
{
cout<<aa[i];
}
}
记录
by mushroom_knight @ 2020-08-12 22:02:11
存到数组里reverse
一下不好?
by LucasXu80 @ 2020-08-12 22:02:18
换行符的锅?
by mushroom_knight @ 2020-08-12 22:02:31
@Mr_steamedbread
顺便 %%% wlm
by Mr_steamedbread @ 2020-08-12 22:04:24
@LucasXu80 感激!
by mushroom_knight @ 2020-08-12 22:05:37
@Mr_steamedbread wlmAKIOI
by LucasXu80 @ 2020-08-12 22:06:06
@Mr_steamedbread 您就直接 cin>>aa 就可以了。
by 听取MLE声一片 @ 2020-08-12 22:09:47
@Mr_steamedbread
改成这样就行了,不要用getline读换行
#include <bits/stdc++.h>
using namespace std;
int main()
{
string a;
cin>>a;
for(int i=a.length()-1;i>=0;i--)
cout<<a[i];
return 0;
}
话说我怎么那么不喜欢看别人不打return 0
by Mr_steamedbread @ 2020-08-12 22:10:23
@Ace_Translator
不要以为你上小号你就可以乱%%%人,不要以为你是奆奆就乱%%%别人。你没有证据!!!洛谷,就是奆奆享有最高权力,你认为我是奆,你就%%%吧,你甚至可以刷爆我的私信。但是,群众的眼睛是雪亮的!!!!
如果你%%%了我,会让全天下的oiers知道,我有多菜!!!
我将会臭名昭著
by 听取MLE声一片 @ 2020-08-12 22:10:36
@Mr_steamedbread 我比较好奇您自题是怎么AC的
by Mr_steamedbread @ 2020-08-12 22:10:53
@听取MLE声一片 蟹蟹辽