#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 |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58143858 | Utilizator | |
Fișier | numere21.cpp | Dimensiune | 715 B |
Data încărcării | 16 Mai 2025, 10:23 | Scor / rezultat | Eroare de compilare |
numere21.cpp: In function 'int main()': numere21.cpp:5:11: error: expected initializer before '>>' token cin>>x>>y; ^ numere21.cpp:6:14: error: 'x' was not declared in this scope while(x!=0 && y!=0){ ^ numere21.cpp:6:22: error: 'y' was not declared in this scope while(x!=0 && y!=0){ ^ numere21.cpp:7:18: error: 'aa' was not declared in this scope int a=x; aa=x; ^ numere21.cpp:8:17: error: 'bb' was not declared in this scope int b=y;bb=y; ^ numere21.cpp:10:13: error: 'r' was not declared in this scope r=a%b; ^ numere21.cpp:15:17: error: 'oglx' was not declared in this scope oglx=oglx*10+x%10; ^ numere21.cpp:18:21: error: 'ogly' was not declared in this scope ogly=ogly*10+y%10; ^ numere21.cpp:20:27: error: 'ogly' was not declared in this scope while(ogly!=0){ ^ numere21.cpp:21:25: error: 'r' was not declared in this scope r=oglx%ogly; ^ numere21.cpp:21:27: error: 'oglx' was not declared in this scope r=oglx%ogly; ^ numere21.cpp:25:16: error: 'oglx' was not declared in this scope if(oglx==1){ ^ numere21.cpp:27:27: error: expected '}' at end of input cin>>x>>y;} ^
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ă.