***第6点没过，请神犇纠错，蒟蒻感激不已！！！***

``````评测结果

WrongAnswer, time = 30 ms, mem = 564 KiB, score = 90

#include<iostream>
#include<cstring>
using namespace std;
char s[16];
int num=0;//正数
long long ans;
int main()
{
cin>>s;
if(s[0]=='-')
num=1;//负数
int len=strlen(s);
for(int i=len-1-num;i>=0+num;i--)
{
ans*=10;
ans+=s[i]-'0';
}
if(num)
cout<<'-';
cout<<ans;
return 0;
}

``````

1 条评论

• @ 2016-11-08 22:48:32
``````
评测结果

编译成功

测试数据 #0: Accepted, time = 0 ms, mem = 560 KiB, score = 10

测试数据 #1: Accepted, time = 0 ms, mem = 560 KiB, score = 10

测试数据 #2: Accepted, time = 0 ms, mem = 560 KiB, score = 10

测试数据 #3: Accepted, time = 0 ms, mem = 560 KiB, score = 10

测试数据 #4: Accepted, time = 0 ms, mem = 560 KiB, score = 10

测试数据 #5: Accepted, time = 0 ms, mem = 556 KiB, score = 10

测试数据 #6: Accepted, time = 0 ms, mem = 560 KiB, score = 10

测试数据 #7: Accepted, time = 0 ms, mem = 560 KiB, score = 10

测试数据 #8: Accepted, time = 0 ms, mem = 560 KiB, score = 10

测试数据 #9: Accepted, time = 0 ms, mem = 560 KiB, score = 10

Accepted, time = 0 ms, mem = 560 KiB, score = 100

代码

#include<iostream>
#include<cstring>
using namespace std;
char s[16];
int num=0;//正数
long long ans;
int main()
{
cin>>s;
if(s[0]=='-')
num=1;//负数
int len=strlen(s);
for(int i=len-1;i>=0+num;i--)
{
ans*=10;
ans+=s[i]-'0';
}
if(num)
cout<<'-';
cout<<ans;
return 0;
}

``````

原先小题大做了……

• 1

ID
1756

4

3843

1734

45%

12