Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
157796 张蔚林 寻找绝对素数 C++ Compile Error 0 MS 0 KB 406 2026-08-17 21:51:21

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; bool t(int x){ for(int i=2;i<=x/2;i++){ if(x%i==0) return false; } return true; } int dx(int y,){ int t=0; } while(x=!0){ t=t*10+y%10; x/=10; } return t; } int main(){ int n,c=0; cin>>n; for(int i=2;i<=n-2;i++){ if(t(i)&&dx-(t)){ cout<<i<<' '<<t<<endl; c++; } } if(c==0)cout<<"No"; return 0; }


Run Info:

Main.cc:9:14: error: expected identifier before ')' token
 int dx(int y,){
              ^
Main.cc: In function 'int dx(int, int)':
Main.cc:10:9: warning: unused variable 't' [-Wunused-variable]
     int t=0;
         ^
Main.cc:11:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
Main.cc: At global scope:
Main.cc:12:2: error: expected unqualified-id before 'while'
  while(x=!0){
  ^
Main.cc:16:2: error: expected unqualified-id before 'return'
  return t;
  ^
Main.cc:17:1: error: expected declaration before '}' token
 }
 ^