#303
Eratostene
Se dau n
numere naturale mai mici decât 1.000.000
. Determinaţi câte dintre ele sunt prime.
Problema | Eratostene | Operații I/O |
eratostene.in /eratostene.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #4806975 | Utilizator | |
Fișier | eratostene.cpp | Dimensiune | 471 B |
Data încărcării | 26 Martie 2017, 21:19 | Scor / rezultat | Eroare de compilare |
eratostene.cpp:9:2: error: stray '\342' in program freopen(”eratostene.in”, “r”,stdin); ^ eratostene.cpp:9:2: error: stray '\200' in program eratostene.cpp:9:2: error: stray '\235' in program eratostene.cpp:9:2: error: stray '\342' in program eratostene.cpp:9:2: error: stray '\200' in program eratostene.cpp:9:2: error: stray '\235' in program eratostene.cpp:9:2: error: stray '\342' in program eratostene.cpp:9:2: error: stray '\200' in program eratostene.cpp:9:2: error: stray '\234' in program eratostene.cpp:9:2: error: stray '\342' in program eratostene.cpp:9:2: error: stray '\200' in program eratostene.cpp:9:2: error: stray '\235' in program eratostene.cpp:10:2: error: stray '\342' in program freopen(”eratostene.out”, “w”,stdout); ^ eratostene.cpp:10:2: error: stray '\200' in program eratostene.cpp:10:2: error: stray '\235' in program eratostene.cpp:10:2: error: stray '\342' in program eratostene.cpp:10:2: error: stray '\200' in program eratostene.cpp:10:2: error: stray '\235' in program eratostene.cpp:10:2: error: stray '\342' in program eratostene.cpp:10:2: error: stray '\200' in program eratostene.cpp:10:2: error: stray '\234' in program eratostene.cpp:10:2: error: stray '\342' in program eratostene.cpp:10:2: error: stray '\200' in program eratostene.cpp:10:2: error: stray '\235' in program eratostene.cpp: In function 'int main()': eratostene.cpp:8:2: error: 'ok' was not declared in this scope ok = 0, n, i, j,nr; ^ eratostene.cpp:8:10: error: 'n' was not declared in this scope ok = 0, n, i, j,nr; ^ eratostene.cpp:8:13: error: 'i' was not declared in this scope ok = 0, n, i, j,nr; ^ eratostene.cpp:8:16: error: 'j' was not declared in this scope ok = 0, n, i, j,nr; ^ eratostene.cpp:8:18: error: 'nr' was not declared in this scope ok = 0, n, i, j,nr; ^ eratostene.cpp:9:13: error: 'eratostene' was not declared in this scope freopen(”eratostene.in”, “r”,stdin); ^ eratostene.cpp:9:34: error: 'r' was not declared in this scope freopen(”eratostene.in”, “r”,stdin); ^ eratostene.cpp:10:35: error: 'w' was not declared in this scope freopen(”eratostene.out”, “w”,stdout); ^ eratostene.cpp:22:2: error: expected primary-expression before '}' token } ^ eratostene.cpp:22:2: error: expected ';' before '}' token
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Eratostene 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ă.