#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 | #53656744 | Utilizator | |
Fișier | max3cif.cpp | Dimensiune | 1.91 KB |
Data încărcării | 07 Noiembrie 2024, 14:02 | Scor / rezultat | Eroare de compilare |
max3cif.cpp: In function 'int main()': max3cif.cpp:10:5: error: reference to 'cin' is ambiguous cin >> n >> cer; ^ max3cif.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("3cifre.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from max3cif.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ max3cif.cpp:15:13: error: reference to 'cin' is ambiguous cin >> a[i]; ^ max3cif.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("3cifre.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from max3cif.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ max3cif.cpp:45:9: error: reference to 'cout' is ambiguous cout << mini << ' ' << fmin << ' ' << nrmin1 << ' ' << nrmin2 << endl; ^ max3cif.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("3cifre.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from max3cif.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ max3cif.cpp:46:9: error: reference to 'cout' is ambiguous cout << maxi << ' ' << fmax << ' ' << nrmax1 << ' ' << nrmax2; ^ max3cif.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("3cifre.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from max3cif.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ max3cif.cpp:52:13: error: reference to 'cin' is ambiguous cin >> a[i]; ^ max3cif.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("3cifre.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from max3cif.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ max3cif.cpp:64:9: error: reference to 'cout' is ambiguous cout << maxi << endl; ^ max3cif.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("3cifre.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from max3cif.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ max3cif.cpp:68:17: error: reference to 'cout' is ambiguous cout << i << " "; ^ max3cif.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("3cifre.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from max3cif.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream 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ă.