#3312
Eratostene1
Se dau n
numere naturale. Aflaţi câte dintre aceste numere sunt prime.
NeuroN
Problema | Eratostene1 | Operații I/O |
eratostene1.in /eratostene1.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0.1 MB
|
Id soluție | #54311016 | Utilizator | |
Fișier | eratostene1.cpp | Dimensiune | 606 B |
Data încărcării | 25 Noiembrie 2024, 14:09 | Scor / rezultat | Eroare de compilare |
eratostene1.cpp: In function 'int main()': eratostene1.cpp:23:9: error: 'm' was not declared in this scope m++; ^ eratostene1.cpp:24:9: error: 'a' was not declared in this scope a[m]=i; ^ eratostene1.cpp:26:16: error: 'n' was not declared in this scope for(i=1;i<=n;i++) ^ eratostene1.cpp:28:12: error: 'x' was not declared in this scope f>>x; ^ eratostene1.cpp:29:9: error: 'k' was not declared in this scope k=0; ^ eratostene1.cpp:30:13: error: 'p' was not declared in this scope for(p=1;a[p]*a[p]<=x && k=0; p++) ^ eratostene1.cpp:30:17: error: 'a' was not declared in this scope for(p=1;a[p]*a[p]<=x && k=0; p++) ^ eratostene1.cpp:34:8: error: 'k' was not declared in this scope if(k==0 && x>=2)nr++; ^ eratostene1.cpp:34:16: error: 'x' was not declared in this scope if(k==0 && x>=2)nr++; ^ eratostene1.cpp:34:21: error: 'nr' was not declared in this scope if(k==0 && x>=2)nr++; ^ eratostene1.cpp:38:4: error: 'nr' was not declared in this scope g<<nr; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Eratostene1 face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.