#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 | #64675998 | Utilizator | |
| Fișier | mygo.cpp | Dimensiune | 6.88 KB |
| Data încărcării | 22 Mai 2026, 02:46 | Scor/rezultat | 0 puncte |
mygo.cpp: In function ‘long long unsigned int putere(int, int)’: mygo.cpp:27:12: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long long unsigned int’ [-Wsign-compare] 27 | while (b > produs) { | ~~^~~~~~~~ mygo.cpp:32:16: warning: comparison of integer expressions of different signedness: ‘long long unsigned int’ and ‘int’ [-Wsign-compare] 32 | if (produs <= b) { | ~~~~~~~^~~~ mygo.cpp: In function ‘int PB_ceva()’: mygo.cpp:127:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 127 | for (int i = 0; i < strlen(n); i++) { | ~~^~~~~~~~~~~ mygo.cpp:128:13: warning: array subscript has type ‘char’ [-Wchar-subscripts] 128 | freq[n[i]]++; | ~~~^ mygo.cpp:131:14: warning: array subscript has type ‘char’ [-Wchar-subscripts] 131 | if (freq[i] > 1) { | ^ mygo.cpp:132:37: warning: array subscript has type ‘char’ [-Wchar-subscripts] 132 | suma /= Permutari_cu_mod(freq[i]); | ^ mygo.cpp:124:7: warning: unused variable ‘k’ [-Wunused-variable] 124 | int k; | ^ mygo.cpp: In function ‘int descompunere_factori_factoriale()’: mygo.cpp:144:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long long unsigned int’ [-Wsign-compare] 144 | for (int i = max(b, c) + 1; i <= a; i++) { | ~~^~~~ mygo.cpp:155:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const long long unsigned int’ [-Wsign-compare] 155 | for (int i = 2; i <= min(b, c); i++) { | ~~^~~~~~~~~~~~ mygo.cpp:168:1: warning: no return statement in function returning non-void [-Wreturn-type] 168 | } | ^ mygo.cpp: In function ‘int ma2in()’: mygo.cpp:175:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long long unsigned int’ [-Wsign-compare] 175 | for (int i = max(b, c) + 1; i <= a; i++) { | ~~^~~~ mygo.cpp:182:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const long long unsigned int’ [-Wsign-compare] 182 | for (int i = 2; i <= min(b, c); i++) { | ~~^~~~~~~~~~~~ mygo.cpp:172:27: warning: unused variable ‘cntc’ [-Wunused-variable] 172 | int cnta = 0, cntb = 0, cntc = 0; | ^~~~ mygo.cpp:195:1: warning: no return statement in function returning non-void [-Wreturn-type] 195 | } | ^ mygo.cpp: In function ‘int pb_3630_30_limita_de_timp_depasita()’: mygo.cpp:237:27: warning: comparison of integer expressions of different signedness: ‘long long int’ and ‘long long unsigned int’ [-Wsign-compare] 237 | for (long long i = 1; i <= n; i++) { | ~~^~~~ mygo.cpp:244:1: warning: no return statement in function returning non-void [-Wreturn-type] 244 | } | ^ mygo.cpp: In function ‘int pb_1297()’: mygo.cpp:261:1: warning: no return statement in function returning non-void [-Wreturn-type] 261 | } | ^ mygo.cpp: In function ‘int veverita_programare_dinamica()’: mygo.cpp:292:1: warning: no return statement in function returning non-void [-Wreturn-type] 292 | } | ^ mygo.cpp: In function ‘int pb_3589()’: mygo.cpp:322:1: warning: no return statement in function returning non-void [-Wreturn-type] 322 | } | ^ mygo.cpp: In function ‘int prob4812()’: mygo.cpp:232:1: warning: control reaches end of non-void function [-Wreturn-type] 232 | } | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.004 secunde | Raspuns gresit. | 10 | 0 | Exemplu | |
| 2 | 0.003 secunde | Raspuns gresit. | 10 | 0 | ||
| 3 | 0.003 secunde | Raspuns gresit. | 20 | 0 | ||
| 4 | 0.01 secunde | Raspuns gresit. | 20 | 0 | ||
| 5 | 0.004 secunde | Raspuns gresit. | 20 | 0 | ||
| 6 | 0.009 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 0 | |||||
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ă.