#3479
2lan
C++
Se da un număr n
. Calculați ultima cifră a lui \({2}^{n}\).
Problema | 2lan | Operații I/O |
2lan.in /2lan.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0.1 MB
|
Id soluție | #43866766 | Utilizator | |
Fișier | lan.cpp | Dimensiune | 333 B |
Data încărcării | 22 Mai 2023, 09:39 | Scor / rezultat | Eroare de compilare |
lan.cpp: In function 'int main()': lan.cpp:5:5: error: 'ifstream' was not declared in this scope ifstream fin("2lan.in"); ^ lan.cpp:5:5: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:38:0, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from lan.cpp:1: /usr/include/c++/4.8/iosfwd:157:34: note: 'std::ifstream' typedef basic_ifstream<char> ifstream; ^ lan.cpp:5:14: error: expected ';' before 'fin' ifstream fin("2lan.in"); ^ lan.cpp:6:1: error: 'ofstream' was not declared in this scope ofstream fout("2lan.out"); ^ lan.cpp:6:1: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:38:0, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from lan.cpp:1: /usr/include/c++/4.8/iosfwd:160:34: note: 'std::ofstream' typedef basic_ofstream<char> ofstream; ^ lan.cpp:6:10: error: expected ';' before 'fout' ofstream fout("2lan.out"); ^ lan.cpp:8:5: error: 'fin' was not declared in this scope fin>>n; ^ lan.cpp:10:9: error: 'fout' was not declared in this scope fout<<"1"; ^ lan.cpp:12:6: error: 'fout' was not declared in this scope fout<<"6"; ^ lan.cpp:14:6: error: 'fout' was not declared in this scope fout<<"2"; ^ lan.cpp:16:6: error: 'fout' was not declared in this scope fout<<"4"; ^ lan.cpp:18:6: error: 'fout' was not declared in this scope fout<<"8"; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema 2lan 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ă.