为什么自己运行可以,提交不行捏
查看原帖
为什么自己运行可以,提交不行捏
1313770
TXZNB楼主2024/3/18 18:02
#include<stdio.h>
int main()
{
	char  start[1000]={}, end[1000]={};
	int i, count = 0;
	for (i = 0; i < 1000; i++)
	{
		scanf("%c", &start[i]);
		if (start[i] == '\n')
			break;
	}
	for (i = 0; i < 1000; i++)
	{
		scanf("%c", &end[i]);
		if (end[i] == '\n')
			break;
	}
	for (i = 0; i < 1000; i++)
	{
		if (start[i] != 0)
		{
			if (start[i] != end[i])
			{
				start[i] = start[i] == '*' ? 'o' : '*';
				start[i + 1] = start[i + 1] == '*' ? 'o' : '*';
				count++;

			}
		}
		
	}
	printf("%d", count);
	return 0;
}

这个还是不行捏

2024/3/18 18:02
加载中...