#2011
Dându-se un vector A cu 10 componente numere naturale, se întreabă câte numere distincte cu \( \sum\limits_{i=0}^9 A[i] \) cifre există astfel încât să conțină exact A[0] cifre de 0, A[1] cifre de 1, … A[9] cifre de 9?.
| Problema | Mygo | Operații I/O |
mygo.in/mygo.out
|
|---|---|---|---|
| Limita timp | 0.05 secunde | Limita memorie |
Total: 5 MB
/
Stivă 1 MB
|
| Id soluție | #64677279 | Utilizator | |
| Fișier | mygo.cpp | Dimensiune | 8.33 KB |
| Data încărcării | 22 Mai 2026, 09:07 | Scor/rezultat | 100 puncte |
mygo.cpp: In function ‘long long unsigned int putere(int, int)’: mygo.cpp:30:12: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long long unsigned int’ [-Wsign-compare] 30 | while (b > produs) { | ~~^~~~~~~~ mygo.cpp:35:16: warning: comparison of integer expressions of different signedness: ‘long long unsigned int’ and ‘int’ [-Wsign-compare] 35 | if (produs <= b) { | ~~~~~~~^~~~ mygo.cpp: In function ‘int PB_ceva()’: mygo.cpp:128:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 128 | for (int i = 0; i < strlen(n); i++) { | ~~^~~~~~~~~~~ mygo.cpp:129:13: warning: array subscript has type ‘char’ [-Wchar-subscripts] 129 | freq[n[i]]++; | ~~~^ mygo.cpp:132:14: warning: array subscript has type ‘char’ [-Wchar-subscripts] 132 | if (freq[i] > 1) { | ^ mygo.cpp:133:37: warning: array subscript has type ‘char’ [-Wchar-subscripts] 133 | suma /= Permutari_cu_mod(freq[i]); | ^ mygo.cpp:125:7: warning: unused variable ‘k’ [-Wunused-variable] 125 | int k; | ^ mygo.cpp: In function ‘int ma2in()’: mygo.cpp:172:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long long unsigned int’ [-Wsign-compare] 172 | for (int i = max(b, c) + 1; i <= a; i++) { | ~~^~~~ mygo.cpp:179:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const long long unsigned int’ [-Wsign-compare] 179 | for (int i = 2; i <= min(b, c); i++) { | ~~^~~~~~~~~~~~ mygo.cpp:169:27: warning: unused variable ‘cntc’ [-Wunused-variable] 169 | int cnta = 0, cntb = 0, cntc = 0; | ^~~~ mygo.cpp: In function ‘int pb_3630_30_limita_de_timp_depasita()’: mygo.cpp:226:27: warning: comparison of integer expressions of different signedness: ‘long long int’ and ‘long long unsigned int’ [-Wsign-compare] 226 | for (long long i = 1; i <= n; i++) { | ~~^~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 10 | 10 | Exemplu | |
| 2 | 0.001 secunde | OK. | 10 | 10 | ||
| 3 | 0.003 secunde | OK. | 20 | 20 | ||
| 4 | 0.002 secunde | OK. | 20 | 20 | ||
| 5 | 0.006 secunde | OK. | 20 | 20 | ||
| 6 | 0.007 secunde | OK. | 20 | 20 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Mygo 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ă.