| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 19326 | 李思贤 | 夏令营旗手 | C++ | Wrong Answer | 10 | 0 MS | 252 KB | 462 | 2021-05-15 10:21:32 |
#include<bits/stdc++.h> using namespace std; int zhishu[10010]; int sum=0,j=1; bool panduan(int a){ if(a==2) return true; int b=sqrt(a); b++; for(int c=2;c<=b;c++){ if(a%c==0) return false; } return true; } int main(){ int n; cin>>n; for(int i=2;i<=n;i++){ if(panduan(i)) zhishu[j]=i,j++; } for(int i=1;i<=n;i++){ zhishu[i]+=i; } for(int i=1;i<=n;i++){ if(panduan(zhishu[i])) sum+=zhishu[i]; } cout<<sum%(n+1); }