#3906
suma_perm_cif
Scrieți un program care citește un număr natural n
cu cifre distincte și care să calculeze și să afișeze suma S
a tuturor numerelor obținute prin rearanjarea cifrelor lui n
.
Problema | suma_perm_cif | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 16 MB
/
Stivă 8 MB
|
Id soluție | #52483254 | Utilizator | |
Fișier | suma_perm_cif.cpp | Dimensiune | 638 B |
Data încărcării | 01 Octombrie 2024, 13:17 | Scor / rezultat | Eroare de compilare |
suma_perm_cif.cpp:7:1: error: stray '\342' in program { int a = 0; ^ suma_perm_cif.cpp:7:1: error: stray '\200' in program suma_perm_cif.cpp:7:1: error: stray '\203' in program suma_perm_cif.cpp:7:1: error: stray '\342' in program suma_perm_cif.cpp:7:1: error: stray '\200' in program suma_perm_cif.cpp:7:1: error: stray '\203' in program suma_perm_cif.cpp:9:2: error: stray '\342' in program { a = a * 10 + x[v[i]]; } ^ suma_perm_cif.cpp:9:2: error: stray '\200' in program suma_perm_cif.cpp:9:2: error: stray '\203' in program suma_perm_cif.cpp:9:2: error: stray '\342' in program suma_perm_cif.cpp:9:2: error: stray '\200' in program suma_perm_cif.cpp:9:2: error: stray '\203' in program suma_perm_cif.cpp:12:1: error: stray '\342' in program { for(int i = 1; i < k; ++i) ^ suma_perm_cif.cpp:12:1: error: stray '\200' in program suma_perm_cif.cpp:12:1: error: stray '\203' in program suma_perm_cif.cpp:12:1: error: stray '\342' in program suma_perm_cif.cpp:12:1: error: stray '\200' in program suma_perm_cif.cpp:12:1: error: stray '\203' in program suma_perm_cif.cpp:16:1: error: stray '\342' in program { if(k == n + 1) ^ suma_perm_cif.cpp:16:1: error: stray '\200' in program suma_perm_cif.cpp:16:1: error: stray '\203' in program suma_perm_cif.cpp:16:1: error: stray '\342' in program suma_perm_cif.cpp:16:1: error: stray '\200' in program suma_perm_cif.cpp:16:1: error: stray '\203' in program suma_perm_cif.cpp:19:2: error: stray '\342' in program { for(int i = 1; i <= n; ++i) ^ suma_perm_cif.cpp:19:2: error: stray '\200' in program suma_perm_cif.cpp:19:2: error: stray '\203' in program suma_perm_cif.cpp:19:2: error: stray '\342' in program suma_perm_cif.cpp:19:2: error: stray '\200' in program suma_perm_cif.cpp:19:2: error: stray '\203' in program suma_perm_cif.cpp:20:2: error: stray '\342' in program { v[k] = i; if(valid(k)) backt(k + 1) ; } } } ^ suma_perm_cif.cpp:20:2: error: stray '\200' in program suma_perm_cif.cpp:20:2: error: stray '\203' in program suma_perm_cif.cpp:20:2: error: stray '\342' in program suma_perm_cif.cpp:20:2: error: stray '\200' in program suma_perm_cif.cpp:20:2: error: stray '\203' in program suma_perm_cif.cpp:22:1: error: stray '\342' in program { cin >> nr; ^ suma_perm_cif.cpp:22:1: error: stray '\200' in program suma_perm_cif.cpp:22:1: error: stray '\203' in program suma_perm_cif.cpp:22:1: error: stray '\342' in program suma_perm_cif.cpp:22:1: error: stray '\200' in program suma_perm_cif.cpp:22:1: error: stray '\203' in program suma_perm_cif.cpp:26:2: error: stray '\342' in program { i++; x[i] = nr % 10; nr /= 10; } n = i; backt(1); cout << sum; return 0; } ^ suma_perm_cif.cpp:26:2: error: stray '\200' in program suma_perm_cif.cpp:26:2: error: stray '\203' in program suma_perm_cif.cpp:26:2: error: stray '\342' in program suma_perm_cif.cpp:26:2: error: stray '\200' in program suma_perm_cif.cpp:26:2: error: stray '\203' in program
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema suma_perm_cif 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ă.