Pagini recente » Borderou de evaluare (job #2394395) | Borderou de evaluare (job #2421103) | Borderou de evaluare (job #1232662) | Borderou de evaluare (job #2724957) | Borderou de evaluare (job #1551717)
Borderou de evaluare (job #1551717)
Raport evaluator
Compilare:
user.cpp: In function ‘int main()’:
user.cpp:2:102: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
using namespace std;long long n,I,v[1300005];bool ok[1300005];int main(){freopen("prim.in","r",stdin);freopen("prim.out","w",stdout);scanf("%lld",&n);memset(ok,true,sizeof(ok));for (int i = 2; i<=1299722; ++i){if (ok[i]){v[++I]=i;for (int j = i*2 ; j<=1299722; j+=i){ok[j]=false;}}}long long x=1LL*v[n+1]*v[n+1];printf("%lld",x);}
^
user.cpp:2:133: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
using namespace std;long long n,I,v[1300005];bool ok[1300005];int main(){freopen("prim.in","r",stdin);freopen("prim.out","w",stdout);scanf("%lld",&n);memset(ok,true,sizeof(ok));for (int i = 2; i<=1299722; ++i){if (ok[i]){v[++I]=i;for (int j = i*2 ; j<=1299722; j+=i){ok[j]=false;}}}long long x=1LL*v[n+1]*v[n+1];printf("%lld",x);}
^
user.cpp:2:150: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
using namespace std;long long n,I,v[1300005];bool ok[1300005];int main(){freopen("prim.in","r",stdin);freopen("prim.out","w",stdout);scanf("%lld",&n);memset(ok,true,sizeof(ok));for (int i = 2; i<=1299722; ++i){if (ok[i]){v[++I]=i;for (int j = i*2 ; j<=1299722; j+=i){ok[j]=false;}}}long long x=1LL*v[n+1]*v[n+1];printf("%lld",x);}
^
| Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
| 1 | 24ms | 2500kb | OK | 10 |
| 2 | 20ms | 2492kb | OK | 10 |
| 3 | 24ms | 2496kb | OK | 10 |
| 4 | 20ms | 2496kb | OK | 10 |
| 5 | 20ms | 2500kb | OK | 10 |
| 6 | 20ms | 2492kb | OK | 10 |
| 7 | 20ms | 2492kb | OK | 10 |
| 8 | 20ms | 2500kb | OK | 10 |
| 9 | 20ms | 2492kb | OK | 10 |
| 10 | 20ms | 2496kb | OK | 10 |
| Punctaj total | 100 |