#3272
Se dau n numere naturale. Determinați suma divizorilor oglinditelor celor n numere.
| Problema | SumDivOgl | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64310634 | Utilizator | |
| Fișier | sumdivogl.cpp | Dimensiune | 448 B |
| Data încărcării | 29 Aprilie 2026, 09:08 | Scor/rezultat | Eroare de compilare |
sumdivogl.cpp: In function ‘int main()’: sumdivogl.cpp:20:17: error: ‘else’ without a previous ‘if’ 20 | else | ^~~~ sumdivogl.cpp:22:36: warning: range-based ‘for’ loops with initializer only available with ‘-std=c++20’ or ‘-std=gnu++20’ [-Wc++20-extensions] 22 | for (d = 1;d < og / 2:d++) | ^ sumdivogl.cpp:22:46: error: expected ‘;’ before ‘:’ token 22 | for (d = 1;d < og / 2:d++) | ^ | ; sumdivogl.cpp:22:38: warning: statement has no effect [-Wunused-value] 22 | for (d = 1;d < og / 2:d++) | ~~^~~~~~~~ sumdivogl.cpp:27:25: error: expected primary-expression before ‘if’ 27 | if (d * d == og) | ^~ sumdivogl.cpp:26:14: error: expected ‘;’ before ‘if’ 26 | } | ^ | ; 27 | if (d * d == og) | ~~ sumdivogl.cpp:27:25: error: expected primary-expression before ‘if’ 27 | if (d * d == og) | ^~ sumdivogl.cpp:26:14: error: expected ‘)’ before ‘if’ 26 | } | ^ | ) 27 | if (d * d == og) | ~~ sumdivogl.cpp:22:29: note: to match this ‘(’ 22 | for (d = 1;d < og / 2:d++) | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SumDivOgl 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ă.