#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 | #55064816 | Utilizator | |
Fișier | lan.cpp | Dimensiune | 409 B |
Data încărcării | 19 Decembrie 2024, 18:52 | Scor / rezultat | Eroare de compilare |
lan.cpp:3:1: error: 'ifstream' does not name a type ifstream fin("2lan.in"); ^ lan.cpp:4:1: error: 'ofstream' does not name a type ofstream fout("2lan.out"); ^ lan.cpp: In function 'int main()': lan.cpp:8:1: error: 'fin' was not declared in this scope fin>>n; ^ lan.cpp:9:10: error: 'fout' was not declared in this scope if(n==0) fout<<1; ^ lan.cpp:10:15: error: 'fout' was not declared in this scope else if(n==1) fout<<2; ^ lan.cpp:11:15: error: 'fout' was not declared in this scope else if(n==2) fout<<4; ^ lan.cpp:12:15: error: 'fout' was not declared in this scope else if(n==3) fout<<8; ^ lan.cpp:13:15: error: 'fout' was not declared in this scope else if(n==4) fout<<6; ^ lan.cpp:14:15: error: 'fout' was not declared in this scope else if(n==5) fout<<2; ^ lan.cpp:15:15: error: 'fout' was not declared in this scope else if(n==6) fout<<4; ^ lan.cpp:16:15: error: 'fout' was not declared in this scope else if(n==7) fout<<8; ^ lan.cpp:17:15: error: 'fout' was not declared in this scope else if(n==8) fout<<6; ^ lan.cpp:18:15: error: 'fout' was not declared in this scope else if(n==9) fout<<2; ^ lan.cpp:19:16: error: 'fout' was not declared in this scope else if(n==10) fout<<4; ^
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ă.