#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 | #55096356 | Utilizator | |
Fișier | eratostene0.cpp | Dimensiune | 649 B |
Data încărcării | 22 Decembrie 2024, 21:57 | Scor / rezultat | Eroare de compilare |
eratostene0.cpp:8:1: error: expected ',' or ';' before 'int' int n , a[200001] , b[200001] , i , sum[200001] , maxi = 0; ^ eratostene0.cpp: In function 'int main()': eratostene0.cpp:23:10: error: 'n' was not declared in this scope fin>>n; ^ eratostene0.cpp:24:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ eratostene0.cpp:26:14: error: 'a' was not declared in this scope fin>>a[i]>>b[i]; ^ eratostene0.cpp:26:20: error: 'b' was not declared in this scope fin>>a[i]>>b[i]; ^ eratostene0.cpp:27:12: error: 'maxi' was not declared in this scope if(maxi < b[i]) maxi=b[i]; ^ eratostene0.cpp:29:9: error: 'i' was not declared in this scope for(i=1;i<=maxi;i++) ^ eratostene0.cpp:29:16: error: 'maxi' was not declared in this scope for(i=1;i<=maxi;i++) ^ eratostene0.cpp:31:9: error: 'sum' was not declared in this scope sum[i] = sum[i-1] + sumdiv(i); ^ eratostene0.cpp:33:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ eratostene0.cpp:35:15: error: 'sum' was not declared in this scope fout<<sum[b[i]] - sum[a[i] - 1]; ^ eratostene0.cpp:35:19: error: 'b' was not declared in this scope fout<<sum[b[i]] - sum[a[i] - 1]; ^ eratostene0.cpp:35:31: error: 'a' was not declared in this scope fout<<sum[b[i]] - sum[a[i] - 1]; ^
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ă.