17 条题解

  • 1
    @ 2025-2-10 21:04:02

    #include using namespace std; int n,cnt; bool check(int a){ for(int i=2;i*i<=a;i++){ if(a%i0)return false; } return true; } int main(){ cin>>n; for(int i=2;i<=n;i++){ if(i+2<=n&&check(i)&&check(i+2)){ cout<<i<<" "<<i+2<<endl; cnt=1; } } if(cnt0)cout<<"empty"; return 0;

                              1. }***
                  • [ ] 2. | col1**** | col2 | col3 | | --- | --- | --- | | | | | | | | |***

    信息

    ID
    946
    时间
    1000ms
    内存
    128MiB
    难度
    6
    标签
    (无)
    递交数
    1067
    已通过
    295
    上传者