#525
Numere1
Se dau n
numere naturale. Determinaţi cele mai mari două numere cu trei cifre care nu apar printre numerele date.
Problema | Numere1 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #49480003 | Utilizator | |
Fișier | numere1.cpp | Dimensiune | 572 B |
Data încărcării | 04 Martie 2024, 08:48 | Scor / rezultat | Eroare de compilare |
numere1.cpp: In function 'int main()': numere1.cpp:13:14: error: cannot bind 'std::istream {aka std::basic_istream<char>}' lvalue to 'std::basic_istream<char>&&' cin>>x; ^ In file included from /usr/include/c++/4.8/iostream:40:0, from numere1.cpp:1: /usr/include/c++/4.8/istream:872:5: error: initializing argument 1 of 'std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&&, _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = int [200]]' operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x) ^ numere1.cpp:14:13: error: invalid conversion from 'int*' to 'int' [-fpermissive] x[p]=x; ^ numere1.cpp:20:14: error: invalid operands of types 'int [200]' and 'int' to binary 'operator/' if(x/1000==0 && x%100>0) ^ numere1.cpp:20:27: error: invalid operands of types 'int [200]' and 'int' to binary 'operator%' if(x/1000==0 && x%100>0) ^ numere1.cpp:29:16: error: 'mnax1' was not declared in this scope }cout<<mnax1<<" "<<max; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Numere1 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ă.