#3324
Eratostene0
Vi se dau n
perechi de numere naturale i j
, cu i ≤ j
. Pentru fiecare pereche trebuie să aflați suma divizorilor tuturor numerelor din șirul i, i + 1, ..., j
.
Folclorul informatic
Problema | Eratostene0 | Operații I/O |
![]() eratostene0.in /eratostene0.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58600994 | Utilizator | |
Fișier | eratostene0.cpp | Dimensiune | 571 B |
Data încărcării | 28 Iunie 2025, 13:07 | Scor / rezultat | Eroare de compilare |
eratostene0.cpp:7:7: error: 'ind' does not name a type const ind=1000001; ^ eratostene0.cpp:8:12: error: 'MAX' was not declared in this scope ull sumdiv[MAX], sp[MAX]; ^ eratostene0.cpp:8:21: error: 'MAX' was not declared in this scope ull sumdiv[MAX], sp[MAX]; ^ eratostene0.cpp: In function 'void CIUR()': eratostene0.cpp:11:20: error: 'MAX' was not declared in this scope for (int i=1;i<MAX;++i) ^ eratostene0.cpp:13:9: error: 'sumdiv' was not declared in this scope sumdiv[i*j]+=i; ^ eratostene0.cpp:14:20: error: 'MAX' was not declared in this scope for (int i=1;i<MAX;++i) ^ eratostene0.cpp:15:9: error: 'sp' was not declared in this scope sp[i]=sp[i-1]+sumdiv[i]; ^ eratostene0.cpp:15:23: error: 'sumdiv' was not declared in this scope sp[i]=sp[i-1]+sumdiv[i]; ^ eratostene0.cpp: In function 'int main()': eratostene0.cpp:25:15: error: 'sp' was not declared in this scope fout<<sp[dr]-sp[st-1]<<"\n"; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Eratostene0 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ă.