| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 2315 | 吴泽宇 | 连续非素数的最长度 | C++ | Wrong Answer | 90 | 113 MS | 252 KB | 318 | 2019-11-17 09:28:38 |
#include<bits/stdc++.h> using namespace std; int zs(int x){ for(int i=2;i<sqrt(x);i++){ bool y=x%i; if(!y){ return 1; } } return 0; } int main(){ int a,b=0,max1=0; cin>>a; for(int i=1;i<a;i++){ if(zs(i)){ b+=1; if(max1<b) max1=b; }else{ b=0; } } cout<<max1; }