YY第一个编程题本地可以过,为什么考试的通过率为0

#include<iostream>
#include<string>
using namespace std;


char * Fun(char *str,char *des)
{  int i = 0;  int j = 0;  while (str[i] != '\0')  {  if (str[i] != '#')  {  des[j++] = str[i++];  }  else  {  des[j++] = '%';  des[j++] = '2';  des[j++] = '0';  i++;  }  }  des[j] = '\0';  return des;
}

int main()
{  char str[50];  cin >> str;   char des[100];  char *res = Fun(str,des);  cout << res << endl;  return 0;
}

#欢聚集团#
全部评论
你这做麻烦了,直接打印出来就行
点赞
送花
回复
分享
发布于 2018-09-14 23:07
可能输入格式的问题。我java直接in.next()就没问题
点赞
送花
回复
分享
发布于 2018-09-14 18:10
滴滴
校招火热招聘中
官网直投
我C++也是这样通过率为0,有没有人告诉我为什么呀
点赞
送花
回复
分享
发布于 2018-09-14 18:16
好气。。。自测都通过了,case通过率就是0.。。真是无语了
点赞
送花
回复
分享
发布于 2018-09-14 18:20
不是不能用本地莫
点赞
送花
回复
分享
发布于 2018-09-14 18:35
有可能是数组不够大,例子可能给很长
点赞
送花
回复
分享
发布于 2018-09-14 23:08
数组这么小
点赞
送花
回复
分享
发布于 2018-09-16 08:10

相关推荐

点赞 收藏 评论
分享
牛客网
牛客企业服务