#319
Se dă un număr natural nenul n. Să se determine toate modalităţile distincte de descompunere a numărului n în sumă de 3 şi 5.
| Problema | suma35 | Operații I/O |
suma35.in/suma35.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64324366 | Utilizator | |
| Fișier | suma35.cpp | Dimensiune | 565 B |
| Data încărcării | 29 Aprilie 2026, 17:41 | Scor/rezultat | 0 puncte |
suma35.cpp: In function ‘void back(int, int)’: suma35.cpp:21:18: warning: iteration 1 invokes undefined behavior [-Waggressive-loop-optimizations] 21 | st[k]=v[i]; | ~~~^ suma35.cpp:19:19: note: within this loop 19 | for(int i=1; i<=2; i++) | ~^~~ suma35.cpp: In function ‘int main()’: suma35.cpp:36:8: warning: array subscript 2 is above array bounds of ‘int [2]’ [-Warray-bounds=] 36 | v[2]=5; | ~~~^ suma35.cpp:8:17: note: while referencing ‘v’ 8 | int st[100], n, v[2]; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
| 2 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 3 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema suma35 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ă.