#1297
Se dă un triunghi de numere. Deduceți regula după care a fost format si afișați al n-lea sir al acestui triunghi.
| Problema | triunghiul | Operații I/O |
triunghiul.in/triunghiul.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64641365 | Utilizator | |
| Fișier | triunghiul.cpp | Dimensiune | 4.66 KB |
| Data încărcării | 20 Mai 2026, 02:14 | Scor/rezultat | 100 puncte |
triunghiul.cpp: In function ‘long long unsigned int putere(int, int)’: triunghiul.cpp:90:12: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long long unsigned int’ [-Wsign-compare] 90 | while (b > produs) { | ~~^~~~~~~~ triunghiul.cpp:96:16: warning: comparison of integer expressions of different signedness: ‘long long unsigned int’ and ‘int’ [-Wsign-compare] 96 | if (produs <= b) { | ~~~~~~~^~~~ triunghiul.cpp: In function ‘int PB_ceva()’: triunghiul.cpp:119:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 119 | for (int i = 0; i < strlen(n); i++) { | ~~^~~~~~~~~~~ triunghiul.cpp:120:13: warning: array subscript has type ‘char’ [-Wchar-subscripts] 120 | freq[n[i]]++; | ~~~^ triunghiul.cpp:123:14: warning: array subscript has type ‘char’ [-Wchar-subscripts] 123 | if (freq[i] > 1) { | ^ triunghiul.cpp:124:37: warning: array subscript has type ‘char’ [-Wchar-subscripts] 124 | suma /= Permutari_cu_mod(freq[i]); | ^ triunghiul.cpp:116:7: warning: unused variable ‘k’ [-Wunused-variable] 116 | int k; | ^ triunghiul.cpp: In function ‘int descompunere_factori_factoriale()’: triunghiul.cpp:136:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long long unsigned int’ [-Wsign-compare] 136 | for (int i = max(b, c) + 1; i <= a; i++) { | ~~^~~~ triunghiul.cpp:147:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const long long unsigned int’ [-Wsign-compare] 147 | for (int i = 2; i <= min(b, c); i++) { | ~~^~~~~~~~~~~~ triunghiul.cpp:160:1: warning: no return statement in function returning non-void [-Wreturn-type] 160 | } | ^ triunghiul.cpp: In function ‘int ma2in()’: triunghiul.cpp:167:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long long unsigned int’ [-Wsign-compare] 167 | for (int i = max(b, c) + 1; i <= a; i++) { | ~~^~~~ triunghiul.cpp:174:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const long long unsigned int’ [-Wsign-compare] 174 | for (int i = 2; i <= min(b, c); i++) { | ~~^~~~~~~~~~~~ triunghiul.cpp:164:27: warning: unused variable ‘cntc’ [-Wunused-variable] 164 | int cnta = 0, cntb = 0, cntc = 0; | ^~~~ triunghiul.cpp:187:1: warning: no return statement in function returning non-void [-Wreturn-type] 187 | } | ^ triunghiul.cpp: In function ‘int pb_3630_30_limita_de_timp_depasita()’: triunghiul.cpp:229:27: warning: comparison of integer expressions of different signedness: ‘long long int’ and ‘long long unsigned int’ [-Wsign-compare] 229 | for (long long i = 1; i <= n; i++) { | ~~^~~~ triunghiul.cpp:233:1: warning: no return statement in function returning non-void [-Wreturn-type] 233 | } | ^ triunghiul.cpp: In function ‘int prob4812()’: triunghiul.cpp:224:1: warning: control reaches end of non-void function [-Wreturn-type] 224 | } | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | OK. | 20 | 20 | ||
| 3 | 0.001 secunde | OK. | 20 | 20 | ||
| 4 | 0.001 secunde | OK. | 20 | 20 | ||
| 5 | 0.001 secunde | OK. | 20 | 20 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema triunghiul 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ă.