#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 | #57540520 | Utilizator | |
Fișier | lan.cpp | Dimensiune | 371 B |
Data încărcării | 03 Aprilie 2025, 20:17 | Scor / rezultat | Eroare de compilare |
lan.cpp:4:12: warning: missing terminating " character [enabled by default] ifstream f("2lan.in); ^ lan.cpp:4:1: error: missing terminating " character ifstream f("2lan.in); ^ lan.cpp:5:12: warning: missing terminating " character [enabled by default] ofstream g("2lan.out); ^ lan.cpp:5:1: error: missing terminating " character ofstream g("2lan.out); ^ lan.cpp:8:1: error: expected ')' before '{' token { ^ lan.cpp:8:1: error: expected ')' before '{' token lan.cpp: In function 'std::ifstream f(std::ofstream (*)(int (*)()))': lan.cpp:10:8: error: invalid operands of types 'std::ifstream(std::ofstream (*)(int (*)())) {aka std::basic_ifstream<char>(std::basic_ofstream<char> (*)(int (*)()))}' and 'int' to binary 'operator>>' f>>n; ^ lan.cpp:13:12: error: invalid operands of types 'std::ofstream (*)(int (*)()) {aka std::basic_ofstream<char> (*)(int (*)())}' and 'const char [2]' to binary 'operator<<' g<<"1"; ^ lan.cpp:14:16: error: could not convert '0' from 'int' to 'std::ifstream {aka std::basic_ifstream<char>}' return 0; ^ lan.cpp:17:14: error: invalid operands of types 'std::ofstream (*)(int (*)()) {aka std::basic_ofstream<char> (*)(int (*)())}' and 'const char [2]' to binary 'operator<<' g << "6"; ^ lan.cpp:19:14: error: invalid operands of types 'std::ofstream (*)(int (*)()) {aka std::basic_ofstream<char> (*)(int (*)())}' and 'const char [2]' to binary 'operator<<' g << "8"; ^ lan.cpp:21:14: error: invalid operands of types 'std::ofstream (*)(int (*)()) {aka std::basic_ofstream<char> (*)(int (*)())}' and 'const char [2]' to binary 'operator<<' g << "4"; ^ lan.cpp:23:14: error: invalid operands of types 'std::ofstream (*)(int (*)()) {aka std::basic_ofstream<char> (*)(int (*)())}' and 'const char [2]' to binary 'operator<<' g << "2"; ^ lan.cpp:24:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
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ă.