#2305
Se citesc perechi de numere naturale până la citirea a două valori nule. Să se calculeze suma numerelor din perechile pentru care atât valorile inițiale cât și oglinditele lor sunt prime între ele.
| Problema | Numere21 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64929957 | Utilizator | |
| Fișier | numere21.cpp | Dimensiune | 1.28 KB |
| Data încărcării | 15 Iunie 2026, 18:38 | Scor/rezultat | Eroare de compilare |
numere21.cpp: In function ‘int main()’: numere21.cpp:37:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 37 | int main() | ^~ numere21.cpp:37:9: note: remove parentheses to default-initialize a variable 37 | int main() | ^~ | -- numere21.cpp:37:9: note: or replace parentheses with braces to value-initialize a variable numere21.cpp:38:1: error: a function-definition is not allowed here before ‘{’ token 38 | { | ^ numere21.cpp:79:2: error: expected ‘}’ at end of input 79 | } | ^ numere21.cpp:9:5: note: to match this ‘{’ 9 | { | ^ numere21.cpp:79:2: error: expected ‘}’ at end of input 79 | } | ^ numere21.cpp:4:1: note: to match this ‘{’ 4 | { | ^ numere21.cpp:6:9: warning: unused variable ‘s’ [-Wunused-variable] 6 | int s = 0; | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Numere21 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ă.