#3480
9lan
C++
Se dă un număr natural n
. Calculați ultima cifră a lui \({9}^{n}\).
Problema | 9lan | Operații I/O |
9lan.in /9lan.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0.1 MB
|
Id soluție | #31314361 | Utilizator | |
Fișier | lan.cpp | Dimensiune | 325 B |
Data încărcării | 09 Octombrie 2021, 23:09 | Scor / rezultat | Eroare de compilare |
lan.cpp:4:22: error: no matching function for call to 'std::basic_istream<char>::basic_istream(const char [8])' istream fin("9lan.in"); ^ lan.cpp:4:22: note: candidates are: In file included from /usr/include/c++/4.8/iostream:40:0, from lan.cpp:1: /usr/include/c++/4.8/istream:606:7: note: std::basic_istream<_CharT, _Traits>::basic_istream() [with _CharT = char; _Traits = std::char_traits<char>] basic_istream() ^ /usr/include/c++/4.8/istream:606:7: note: candidate expects 0 arguments, 1 provided /usr/include/c++/4.8/istream:93:7: note: std::basic_istream<_CharT, _Traits>::basic_istream(std::basic_istream<_CharT, _Traits>::__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__streambuf_type = std::basic_streambuf<char>] basic_istream(__streambuf_type* __sb) ^ /usr/include/c++/4.8/istream:93:7: note: no known conversion for argument 1 from 'const char [8]' to 'std::basic_istream<char>::__streambuf_type* {aka std::basic_streambuf<char>*}' lan.cpp:5:24: error: no matching function for call to 'std::basic_ostream<char>::basic_ostream(const char [9])' ostream fout("9lan.out"); ^ lan.cpp:5:24: note: candidates are: In file included from /usr/include/c++/4.8/iostream:39:0, from lan.cpp:1: /usr/include/c++/4.8/ostream:384:7: note: std::basic_ostream<_CharT, _Traits>::basic_ostream() [with _CharT = char; _Traits = std::char_traits<char>] basic_ostream() ^ /usr/include/c++/4.8/ostream:384:7: note: candidate expects 0 arguments, 1 provided /usr/include/c++/4.8/ostream:84:7: note: std::basic_ostream<_CharT, _Traits>::basic_ostream(std::basic_ostream<_CharT, _Traits>::__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__streambuf_type = std::basic_streambuf<char>] basic_ostream(__streambuf_type* __sb) ^ /usr/include/c++/4.8/ostream:84:7: note: no known conversion for argument 1 from 'const char [9]' to 'std::basic_ostream<char>::__streambuf_type* {aka std::basic_streambuf<char>*}' lan.cpp: In function 'int main()': lan.cpp:11:9: error: 'std::istream' has no member named 'close' fin.close() ^ lan.cpp:12:5: error: expected ';' before 'if' if(n == 0){ ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema 9lan 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ă.