Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
154186 杨登博 寻找绝对素数 C++ Wrong Answer 685 MS 268 KB 757 2026-05-24 16:25:57

Tests(7/10):


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 z(int x){ if(x<2)return 0; for(int i=2;i<=x/2;i++){ if(x%i==0){ return 0; } } return 1; } int fz(int y){ int f=0; while(y!=0){ f=f*10+y%10; y/=10; } return z(f); } int main(){ int m,n,s=0; cin>>m>>n; for(int i=m;i<=n;i++){ if(z(i)&&fz(i)){ if(s) cout<<","<<i; else cout<<i; s++; } } return 0; }


Run Info:

------Input------
20 28
------Answer-----
No
------Your output-----