#2271
Se dă un șir cu n numere întregi. Determinați cel mai mare număr care poate fi scris ca produs de două elemente ale șirului.
| Problema | ProdMax1 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64135367 | Utilizator | |
| Fișier | prodmax1.c | Dimensiune | 488 B |
| Data încărcării | 19 Aprilie 2026, 22:13 | Scor/rezultat | 0 puncte |
prodmax1.c: In function ‘main’: prodmax1.c:6:9: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘long long int *’ [-Wformat=] 6 | scanf("%d",&n); | ~^ ~~ | | | | | long long int * | int * | %lld prodmax1.c:9:10: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘long long int *’ [-Wformat=] 9 | {scanf("%d",&m); | ~^ ~~ | | | | | long long int * | int * | %lld prodmax1.c:40:10: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat=] 40 | printf("%d",p2); | ~^ ~~ | | | | | long long int | int | %lld prodmax1.c:42:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat=] 42 | printf("%d",p1); | ~^ ~~ | | | | | long long int | int | %lld prodmax1.c:41:1: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation] 41 | else | ^~~~ prodmax1.c:43:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’ 43 | return 0; | ^~~~~~ prodmax1.c:6:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d",&n); | ^~~~~~~~~~~~~~ prodmax1.c:9:2: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | {scanf("%d",&m); | ^~~~~~~~~~~~~~
| 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. | 10 | 0 | ||
| 4 | 0.008 secunde | Raspuns gresit. | 10 | 0 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 6 | 0.009 secunde | Raspuns gresit. | 10 | 0 | ||
| 7 | 0.009 secunde | Raspuns gresit. | 10 | 0 | ||
| 8 | 0.009 secunde | Raspuns gresit. | 10 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ProdMax1 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ă.