#2029
AfisareN
Citindu-se un număr natural n
şi un şir de caractere să se afişeze de n
ori şirul de caractere.
Problema | AfisareN | Operații I/O |
afisaren.in /afisaren.out
|
---|---|---|---|
Limita timp | 0.27 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0.1 MB
|
Id soluție | #53472800 | Utilizator | |
Fișier | afisaren.cpp | Dimensiune | 421 B |
Data încărcării | 01 Noiembrie 2024, 17:14 | Scor / rezultat | Eroare de compilare |
afisaren.cpp: In function 'int main()': afisaren.cpp:10:5: error: reference to 'cin' is ambiguous cin >> n; ^ afisaren.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("afisaren.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from afisaren.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ afisaren.cpp:11:5: error: reference to 'cin' is ambiguous cin.close(); ^ afisaren.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("afisaren.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from afisaren.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ afisaren.cpp:19:9: error: reference to 'cout' is ambiguous cout << ch; ^ afisaren.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("afisaren.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from afisaren.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ afisaren.cpp:20:9: error: reference to 'cout' is ambiguous cout << endl; ^ afisaren.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("afisaren.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from afisaren.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 AfisareN 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ă.