#4516
max3cif
Dat numărul natural n
, să se determine cel mai mare număr de trei cifre conținut în n
.
Problema | max3cif | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54181802 | Utilizator | |
Fișier | max3cif.cpp | Dimensiune | 597 B |
Data încărcării | 21 Noiembrie 2024, 14:32 | Scor / rezultat | Eroare de compilare |
max3cif.cpp:2:10: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix] #include <climits>\ ^ max3cif.cpp:3:1: warning: extra tokens at end of #include directive [enabled by default] using namespace std; ^ max3cif.cpp: In function 'int main()': max3cif.cpp:7:5: error: 'cin' was not declared in this scope cin>>n; ^ max3cif.cpp:7:5: note: suggested alternative: In file included from max3cif.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ max3cif.cpp:13:30: error: 'swap' was not declared in this scope swap (cmmc1,uc); ^ max3cif.cpp:13:30: note: suggested alternatives: In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from max3cif.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2717:5: note: 'std::swap' swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, ^ In file included from /usr/include/c++/4.8/exception:152:0, from /usr/include/c++/4.8/ios:39, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from max3cif.cpp:1: /usr/include/c++/4.8/bits/exception_ptr.h:160:5: note: 'std::__exception_ptr::swap' swap(exception_ptr& __lhs, exception_ptr& __rhs) ^ max3cif.cpp:26:5: error: 'cout' was not declared in this scope cout<<cmmc3<<cmmc2<<cmmc1; ^ max3cif.cpp:26:5: note: suggested alternative: In file included from max3cif.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema max3cif 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ă.