为何代码在本地和在线IDE 上都能运行但是提交却是编译失败
查看原帖
为何代码在本地和在线IDE 上都能运行但是提交却是编译失败
206423
焚魂楼主2024/9/13 09:15

RT,灵异事件

#include<iostream>
#include<cstdio>
#include<cstring>

using namespace std;

char a[1010],ans[1010];
int tot;

int main() {
	gets(a);
	ans[++tot] = '/';
	for(int i = 0;a[i] != ']';i++) {
		if(a[i] >= 'A' && a[i] <= 'Z') {
			ans[++tot] = a[i] + 32;
		}
	}
	
	for(int i = 1;i <= tot;i++) {
		cout << ans[i];
	}
	
	return 0;
} 
2024/9/13 09:15
加载中...