Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
118714 殷佳雨萱 寻找绝对素数 C++ Compile Error 0 MS 0 KB 535 2025-05-10 11:00:12

Tests(0/0):


Code:

#include<bits/stdc++.h> #include<cmath> using namespace std; int FXS(int a){ int b=0; while(a!=0){ b=b*10+a%10; a=a/10; } return b; } bool SuShu(int w){ if(w==1) return 0; if(w==2) return 0; for(int j=2;j<=sprt(w);j++){ if(w%j==0) return 0; } return 1; } int main(){ int n,m,k,c=0; cin>>n>>m; for(int i=m;i<=n;i++){ k=FXS(i); if(SuShu(i) && SuShu(k)){ if(c==0){ cout<<i; c++; } else{ cout<<","<<i; } } } if(c==0){ cout<<"No"; } }


Run Info:

Main.cc: In function 'bool SuShu(int)':
Main.cc:15:23: error: 'sprt' was not declared in this scope
  for(int j=2;j<=sprt(w);j++){
                       ^