#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 | #57343295 | Utilizator | |
Fișier | loto1.cpp | Dimensiune | 3.21 KB |
Data încărcării | 26 Martie 2025, 20:22 | Scor / rezultat | 90 puncte |
loto1.cpp: In function 'bool vc7()': loto1.cpp:77:10: warning: the address of 'bool vc1()' will always evaluate as 'true' [-Waddress] if (!vc1 && !vc2 && !vc3 && !vc4 && !vc5 && !vc6) ^ loto1.cpp:77:18: warning: the address of 'bool vc2()' will always evaluate as 'true' [-Waddress] if (!vc1 && !vc2 && !vc3 && !vc4 && !vc5 && !vc6) ^ loto1.cpp:77:26: warning: the address of 'bool vc3()' will always evaluate as 'true' [-Waddress] if (!vc1 && !vc2 && !vc3 && !vc4 && !vc5 && !vc6) ^ loto1.cpp:77:34: warning: the address of 'bool vc4()' will always evaluate as 'true' [-Waddress] if (!vc1 && !vc2 && !vc3 && !vc4 && !vc5 && !vc6) ^ loto1.cpp:77:42: warning: the address of 'bool vc5()' will always evaluate as 'true' [-Waddress] if (!vc1 && !vc2 && !vc3 && !vc4 && !vc5 && !vc6) ^ loto1.cpp:77:50: warning: the address of 'bool vc6()' will always evaluate as 'true' [-Waddress] if (!vc1 && !vc2 && !vc3 && !vc4 && !vc5 && !vc6) ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 5 | 5 | ||
2 | 0 secunde | OK. | 5 | 5 | ||
3 | 0 secunde | OK. | 5 | 5 | ||
4 | 0 secunde | OK. | 5 | 5 | ||
5 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
6 | 0 secunde | OK. | 5 | 5 | ||
7 | 0 secunde | OK. | 5 | 5 | ||
8 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
9 | 0 secunde | OK. | 5 | 5 | ||
10 | 0 secunde | OK. | 5 | 5 | ||
11 | 0 secunde | OK. | 5 | 5 | ||
12 | 0 secunde | OK. | 5 | 5 | ||
13 | 0.004 secunde | OK. | 5 | 5 | ||
14 | 0 secunde | OK. | 5 | 5 | ||
15 | 0.004 secunde | OK. | 5 | 5 | ||
16 | 0 secunde | OK. | 5 | 5 | ||
17 | 0 secunde | OK. | 5 | 5 | ||
18 | 0.004 secunde | OK. | 5 | 5 | ||
19 | 0 secunde | OK. | 5 | 5 | ||
20 | 0.004 secunde | OK. | 5 | 5 | ||
Punctaj total | 90 |
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ă.