#2694
Se dau 2 numere naturale cu exact 3 cifre fiecare, să se afișeze cel mai mare numar și cel mai mic numar scris cu o cifră din primul număr și cu o cifră din al doilea.
| Problema | MinMax2 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64354087 | Utilizator | |
| Fișier | minmax2.cpp | Dimensiune | 447 B |
| Data încărcării | 02 Mai 2026, 09:04 | Scor/rezultat | 40 puncte |
minmax2.cpp: In function ‘int main()’: minmax2.cpp:9:18: warning: init-statement in selection statements only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 9 | if(x>y) switch(x; y); | ^ minmax2.cpp:9:18: warning: statement has no effect [-Wunused-value] minmax2.cpp:10:18: warning: init-statement in selection statements only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 10 | if(x>z) switch(x; z); | ^ minmax2.cpp:10:18: warning: statement has no effect [-Wunused-value] minmax2.cpp:11:18: warning: init-statement in selection statements only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 11 | if(y>z) switch(y; z); | ^ minmax2.cpp:11:18: warning: statement has no effect [-Wunused-value] minmax2.cpp:12:18: warning: init-statement in selection statements only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 12 | if(m>n) switch(m; n); | ^ minmax2.cpp:12:18: warning: statement has no effect [-Wunused-value] minmax2.cpp:13:18: warning: init-statement in selection statements only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 13 | if(m>o) switch(m; o); | ^ minmax2.cpp:13:18: warning: statement has no effect [-Wunused-value] minmax2.cpp:14:18: warning: init-statement in selection statements only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 14 | if(n>o) switch(n; o); | ^ minmax2.cpp:14:18: warning: statement has no effect [-Wunused-value]
| 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 | Raspuns gresit. | 20 | 0 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 40 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema MinMax2 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ă.