#3319
Se dau n numere naturale prime. Pentru t perechi de numere naturale s şi d să se afle câte numere naturale din intervalul [s,d] sunt divizibile prin cel puţin unul dintre cele n numere prime.
***
| Problema | Eratostene8 | Operații I/O |
eratostene8.in/eratostene8.out
|
|---|---|---|---|
| Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #63367075 | Utilizator | |
| Fișier | eratostene8.cpp | Dimensiune | 605 B |
| Data încărcării | 28 Februarie 2026, 10:54 | Scor/rezultat | Eroare de compilare |
eratostene8.cpp:6:1: error: 'intv' does not name a type intv[M],n,t; ^ eratostene8.cpp: In function 'int ciur()': eratostene8.cpp:10:10: error: 'n' was not declared in this scope cin>>n>>t; ^ eratostene8.cpp:10:13: error: 't' was not declared in this scope cin>>n>>t; ^ eratostene8.cpp:14:12: error: 'v' was not declared in this scope if(v[x]==0) ^ eratostene8.cpp:24:9: error: 'v' was not declared in this scope v[i]=v[i]+v[i-1]; ^ eratostene8.cpp:25:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ eratostene8.cpp: In function 'int main()': eratostene8.cpp:30:20: error: 't' was not declared in this scope for(int i=1;i<=t;i++) ^ eratostene8.cpp:33:15: error: 'v' was not declared in this scope cout<<v[s]-v[s-1]<<'\n'; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Eratostene8 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ă.