| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 84062 | 陈俊洁 | 寻找绝对素数 | C++ | Wrong Answer | 3 MS | 264 KB | 442 | 2024-07-15 11:22:56 |
#include<bits/stdc++.h> using namespace std; bool sushu (int x){ for(int t=2;t<x;t++){ if(x%t==0){ return false; } } return true; } int main(){ int n,num=0,f=0; cin>>n; for(int i=2;i+2<=n;i++){ if(sushu(i)){ if(sushu(i%10+i/10)){ cout<<i<<" "<<i+2<<endl; num++; } } } if(num==0){ cout<<"No"; } return 0; }
------Input------
1000 10999
------Answer-----
1009,1021,1031,1033,1061,1069,1091,1097,1103,1109,1151,1153,1181,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1279,1283,1301,1321,1381,1399,1409,1429,1439,1453,1471,1487,1499,1511,1523,1559,1583,1597,1601,1619,1657,1669,1723,1733,1741,1753,1789,1811,1831,1847,1867,1879,1901,1913,1933,1949,1979,3011,3019,3023,3049,3067,3083,3089,3109,3121,3163,3169,3191,3203,3221,3251,3257,3271,3299,3301,3319,3343,3347,3359,3371,3373,3389,3391,3407,3433,3463,3467,3469,3511,3527,3541,3571,3583,3613,3643,3697,
------Your output-----
2 4 3 5 5 7 7 9 11 13 23 25 29 31 41 43 43 45 47 49 61 63 67 69 83 85 89 91 101 103 103 105 107 109 109 111 127 129 149 151 163 165 167 169 181 183 227 229 229 231 263 265 281 283 283 285 307 309 347 349 349 351 367 369 383 385 389 391 401 403 421 423 443 445 449 451 461 463 467 469 503 505 509 511 521 523 547 549 563 565 601 603 607 609 643 645 647 649 661 663 683 685 701 703 709 711 727 729 809 811 821 823 827 829 863 865 881 883 907 909 929 931 947 949 967 969 983 985