#3611
Se dă un număr natural n
de exact trei cifre distincte. Să se calculeze suma tuturor numerelor care se pot obține prin interschimbarea cifrelor lui n
.
Folclorul informatic
Problema | sumacifperm | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58348320 | Utilizator | |
Fișier | sumacifperm.cpp | Dimensiune | 417 B |
Data încărcării | 28 Mai 2025, 15:57 | Scor / rezultat | Eroare de compilare |
sumacifperm.cpp: In function 'int main()': sumacifperm.cpp:9:12: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' s1=n1<<endl>>n2>>endl>>n3; ^ sumacifperm.cpp:10:16: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator>>' s2=n1>>endl>>n3>>endl>>n2; ^ sumacifperm.cpp:11:16: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator>>' s3=n2>>endl>>n1>>endl>>n3; ^ sumacifperm.cpp:12:16: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator>>' s4=n2>>endl>>n3>>endl>>n1; ^ sumacifperm.cpp:13:16: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator>>' s5=n3>>endl>>n1>>endl>>n2; ^ sumacifperm.cpp:14:16: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator>>' s6=n3>>endl>>n2>>endl>>n1; ^ sumacifperm.cpp:15:5: error: 'suma' was not declared in this scope suma=s1+s2+s3+s4+s5+s6; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema sumacifperm 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ă.