#2274
Limite
C++
Se dau n
numere naturale. Afișați tipul de date C++ minim ca număr de octeți permite memorarea fiecărui număr. Dacă un număr încape și în tipul cu semn și în tipul fără semn, se afișează tipul cu semn.
Problema | Limite | Operații I/O |
![]() limite.in /limite.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51522057 | Utilizator | |
Fișier | limite.cpp | Dimensiune | 1014 B |
Data încărcării | 03 Iulie 2024, 23:38 | Scor / rezultat | Eroare de compilare |
limite.cpp: In function 'int main()': limite.cpp:9:5: error: reference to 'cin' is ambiguous cin >> n; ^ limite.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("limite.in"); ^ In file included from limite.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ limite.cpp:11:9: error: reference to 'cin' is ambiguous cin >> x; ^ limite.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("limite.in"); ^ In file included from limite.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ limite.cpp:13:13: error: reference to 'cout' is ambiguous cout << "char" << endl; ^ limite.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("limite.out"); ^ In file included from limite.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ limite.cpp:15:13: error: reference to 'cout' is ambiguous cout << "unsigned char" << endl; ^ limite.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("limite.out"); ^ In file included from limite.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ limite.cpp:17:13: error: reference to 'cout' is ambiguous cout << "short" << endl; ^ limite.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("limite.out"); ^ In file included from limite.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ limite.cpp:19:13: error: reference to 'cout' is ambiguous cout << "unsigned short" << endl; ^ limite.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("limite.out"); ^ In file included from limite.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ limite.cpp:21:13: error: reference to 'cout' is ambiguous cout << "int" << endl; ^ limite.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("limite.out"); ^ In file included from limite.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ limite.cpp:23:13: error: reference to 'cout' is ambiguous cout << "unsigned int" << endl; ^ limite.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("limite.out"); ^ In file included from limite.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ limite.cpp:25:13: error: reference to 'cout' is ambiguous cout << "long long" << endl; ^ limite.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("limite.out"); ^ In file included from limite.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ limite.cpp:27:13: error: reference to 'cout' is ambiguous cout << "unsigned long long" << endl; // Added 'U' to indicate unsigned long long ^ limite.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("limite.out"); ^ In file included from limite.cpp:1:0: /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 Limite 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ă.