| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 74504 | 邢逸轩 | 连续非素数的最长度 | C++ | Accepted | 100 | 114 MS | 256 KB | 273 | 2023-05-27 13:57:18 |
#include<bits/stdc++.h> using namespace std; int zhi(int n){ for(int i=2;i*i<=n;i++){ if(n%i==0) return 0; } return 1; } int n,f,ans; int main(){ cin>>n; for(int i=2;i<=n;i++){ if(!zhi(i)){ f++; ans=max(ans,f); }else f=0; } cout<<ans; }