哪错了呀,大佬帮帮忙吧

P2640 神秘磁石

明明编译正确呀? ------------ 蓝瘦香菇555555
by thethe99 @ 2018-04-13 21:02:31


**哪道题啊?**........
by 北街的九命貓 @ 2018-04-13 21:02:56


@[北街的九命貓](/space/show?uid=55918) https://www.luogu.org/problemnew/show/P2640
by thethe99 @ 2018-07-31 22:03:58


``` #include<iostream> #include<cstdio> #include<cmath> using namespace std; bool ss(int n) { for(int i=2;i*i<=n;i++) if(n%i==0) return false; return true; } int main() { int n,k,i,j=0,s=0; cin>>n>>k; for(i=2;i<=n-k;i++) { if(ss(i)&&ss(i+k)) { j=i+k; cout<<i<<" "<<j<<endl; s=1; } } if(s==0) cout<<"empty"; return 0; } ```
by 北街的九命貓 @ 2018-07-31 22:22:03


**好了**
by 北街的九命貓 @ 2018-07-31 22:22:27


|