| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 149831 | 李朋秦 | 超级素数 | C++ | Time Limit Exceeded | 1000 MS | 276 KB | 430 | 2026-03-18 17:39:01 |
#include<bits/stdc++.h> using namespace std; bool sum(int x){ for(long long y=2;y<x;y++){ if(x%y==0){ return false; } }return true; } int main(){ int a,i,f,c=0; cin>>a; for(int i=2;i<=a;i++){ for(i=1;i<=8;i++){ if(a/i<1){ i--; break; } } for(int j=1;j<=i;j++){ f+=sum(a-pow(10,j)); }if(f!=0){ c++; } } cout<<c; return 0; }