有大佬来看看这代码为什么会RE吗
查看原帖
有大佬来看看这代码为什么会RE吗
1439731
yzbzz147268楼主2024/9/29 13:46
#include<bits/stdc++.h>
using namespace std;
int main(){
	int a[10000]={0},b,n,m;
	cin>>n;
	for(int i=2;i<=n;i++){
		for(int j=2;j<=i;j++){
			a[i*j]=1;
		}
	}
	for(int i=4;i<=n;i=i+2){
		for(int j=2;j<=i;j++){
			for(int l=2;l<=j;l++){
				if(a[j]!=1&&a[l]!=1){
					if(j+l==i){
						cout<<i<<"="<<l<<"+"<<j<<"\n";
					} 
				}
			}
		}
	}
	return 0;
}
2024/9/29 13:46
加载中...