#3479
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 | #56753772 | Utilizator | |
Fișier | lan.cpp | Dimensiune | 336 B |
Data încărcării | 04 Martie 2025, 19:28 | Scor / rezultat | Eroare de compilare |
lan.cpp:5:14: warning: missing terminating " character [enabled by default] ofstream out("2lan.out); ^ lan.cpp:5:1: error: missing terminating " character ofstream out("2lan.out); ^ lan.cpp:6:6: error: expected ')' before ';' token int n; ^ lan.cpp: In function 'int main()': lan.cpp:8:8: error: 'n' was not declared in this scope { in>>n; ^ lan.cpp:10:10: error: invalid operands of types 'std::ofstream(int) {aka std::basic_ofstream<char>(int)}' and 'int' to binary 'operator<<' out<<1; ^ lan.cpp:13:10: error: invalid operands of types 'std::ofstream(int) {aka std::basic_ofstream<char>(int)}' and 'int' to binary 'operator<<' out<<6; ^ lan.cpp:16:10: error: invalid operands of types 'std::ofstream(int) {aka std::basic_ofstream<char>(int)}' and 'int' to binary 'operator<<' out<<2; ^ lan.cpp:19:10: error: invalid operands of types 'std::ofstream(int) {aka std::basic_ofstream<char>(int)}' and 'int' to binary 'operator<<' out<<4; ^ lan.cpp:22:10: error: invalid operands of types 'std::ofstream(int) {aka std::basic_ofstream<char>(int)}' and 'int' to binary 'operator<<' out<<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ă.