Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
138576 吕毅心 素数对 C++ Compile Error 0 MS 0 KB 700 2025-11-28 18:22:01

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int s(int z){ int sum=0,c=0; for(int i=2;i<z;i++){ if(z%i==0){ break; }else{ sum+=1; } } if(sum==z-2){ c+=1; } return c; } int main(){ int n,sum=0; cin>>n; for(int i=2;i<=n-2;i++){ if(s(i)+s(i+2)==2){ cout<<i<<" "<<i+2<<endl; } } if(n<7){ cout<<No; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:33:15: error: 'No' was not declared in this scope
         cout<