#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 | #48336526 | Utilizator | |
Fișier | eratostene0.cpp | Dimensiune | 450 B |
Data încărcării | 22 Ianuarie 2024, 15:29 | Scor / rezultat | Eroare de compilare |
eratostene0.cpp:19:28: warning: multi-character character constant [-Wmultichar] fout<<c[y]-c[x-1]<<'/n'; ^ eratostene0.cpp: In function 'int main()': eratostene0.cpp:8:5: error: expected ',' or ';' before 'ofstream' ofstream fout("eratostene0.out") ^ eratostene0.cpp:10:9: error: 'i' was not declared in this scope for(i=1; i<=1000000; i++) ^ eratostene0.cpp:11:13: error: 'j' was not declared in this scope for(j=1; j*i<=1000000; j++) ^ eratostene0.cpp:12:9: error: 'c' was not declared in this scope c[i*j]=c[i*j]+i; ^ eratostene0.cpp:13:9: error: 'i' was not declared in this scope for(i=2; i<=1000000; i++) ^ eratostene0.cpp:14:9: error: 'c' was not declared in this scope c[i]=c[i]-c[i-1]; ^ eratostene0.cpp:15:10: error: 'n' was not declared in this scope fin>>n; ^ eratostene0.cpp:16:9: error: 'i' was not declared in this scope for(i=1; i<=n; i++) ^ eratostene0.cpp:18:14: error: 'x' was not declared in this scope fin>>x>>y; ^ eratostene0.cpp:18:17: error: 'y' was not declared in this scope fin>>x>>y; ^ eratostene0.cpp:19:9: error: 'fout' was not declared in this scope fout<<c[y]-c[x-1]<<'/n'; ^ eratostene0.cpp:19:15: error: 'c' was not declared in this scope fout<<c[y]-c[x-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ă.