#4414
La o tragere loto expres specială se extrag M
numere distincte din mulţimea {1, 2, 3, ..., 49}
. O persoană care joacă la acest joc scrie pe bilet K
numere distincte dintre cele 49
posibile. La tragere au cumpărat bilete J
jucători. Un jucător câștigă la cea mai valoroasă categorie la care se încadrează. Să se scrie un program care să determine:
C
de câștig. Categoriile sunt numerotate {1, 2, ..., 6, 7}
. Categoria 7
este destinată necâștigătorilor.Urmasii lui Moisil, 2023, Clasa a IX-a
Problema | loto1 | Operații I/O |
![]() loto.in /loto.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57380620 | Utilizator | |
Fișier | loto1.cpp | Dimensiune | 2.64 KB |
Data încărcării | 28 Martie 2025, 09:43 | Scor / rezultat | 30 puncte |
loto1.cpp: In function 'void categ()': loto1.cpp:62:15: warning: the address of 'bool categ1()' will always evaluate as 'true' [-Waddress] if (categ1) ^ loto1.cpp:67:15: warning: the address of 'bool categ2()' will always evaluate as 'true' [-Waddress] if (categ2) ^ loto1.cpp:72:15: warning: the address of 'bool categ3()' will always evaluate as 'true' [-Waddress] if (categ3) ^ loto1.cpp:77:15: warning: the address of 'bool categ4()' will always evaluate as 'true' [-Waddress] if (categ4) ^ loto1.cpp:82:15: warning: the address of 'bool categ5()' will always evaluate as 'true' [-Waddress] if (categ5) ^ loto1.cpp:87:15: warning: the address of 'bool categ6()' will always evaluate as 'true' [-Waddress] if (categ6) ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
2 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
3 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
4 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
5 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
6 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
7 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
8 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
9 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
10 | 0 secunde | OK. | 5 | 5 | ||
11 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
12 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
13 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
14 | 0 secunde | OK. | 5 | 5 | ||
15 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
16 | 0 secunde | OK. | 5 | 5 | ||
17 | 0 secunde | OK. | 5 | 5 | ||
18 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
19 | 0 secunde | OK. | 5 | 5 | ||
20 | 0.004 secunde | OK. | 5 | 5 | ||
Punctaj total | 30 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema loto1 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ă.