#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 |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57367882 | Utilizator | |
Fișier | prodmax1.cpp | Dimensiune | 1.22 KB |
Data încărcării | 27 Martie 2025, 17:22 | Scor / rezultat | 100 puncte |
prodmax1.cpp: In function 'int main()': prodmax1.cpp:45:30: warning: format '%lld' expects argument of type 'long long int', but argument 2 has type 'int' [-Wformat=] printf("%lld",x*y); ^ prodmax1.cpp:47:30: warning: format '%lld' expects argument of type 'long long int', but argument 2 has type 'int' [-Wformat=] printf("%lld",x*z); ^ prodmax1.cpp:49:30: warning: format '%lld' expects argument of type 'long long int', but argument 2 has type 'int' [-Wformat=] printf("%lld",y*z); ^ prodmax1.cpp:32:21: warning: unused variable 's' [-Wunused-variable] long long int n,s=0; ^ prodmax1.cpp:33:21: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%lld",&n); ^ prodmax1.cpp:35:28: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%lld",&a[i]); ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 20 | 20 | Exemplu | |
2 | 0 secunde | OK. | 20 | 20 | ||
3 | 0 secunde | OK. | 10 | 10 | ||
4 | 0.028 secunde | OK. | 10 | 10 | ||
5 | 0 secunde | OK. | 10 | 10 | ||
6 | 0.028 secunde | OK. | 10 | 10 | ||
7 | 0.032 secunde | OK. | 10 | 10 | ||
8 | 0.032 secunde | OK. | 10 | 10 | ||
Punctaj total | 100 |
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ă.