#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 | #41872140 | Utilizator | |
Fișier | lan.cpp | Dimensiune | 285 B |
Data încărcării | 07 Februarie 2023, 09:49 | Scor / rezultat | Eroare de compilare |
lan.cpp: In function 'int main()': lan.cpp:4:2: error: 'unsignet' was not declared in this scope {unsignet short int n; ^ lan.cpp:4:11: error: expected ';' before 'short' {unsignet short int n; ^ lan.cpp:7:2: error: 'else' without a previous 'if' else ^ lan.cpp:8:5: error: 'n' was not declared in this scope if (n == 0) out << 1; ^ lan.cpp:8:13: error: 'out' was not declared in this scope if (n == 0) out << 1; ^ lan.cpp:9:5: error: 'n' was not declared in this scope if (n % 4 == 0) out << 6; ^ lan.cpp:9:17: error: 'out' was not declared in this scope if (n % 4 == 0) out << 6; ^ lan.cpp:10:5: error: 'n' was not declared in this scope if (n % 4 == 1) out << 2; ^ lan.cpp:10:17: error: 'out' was not declared in this scope if (n % 4 == 1) out << 2; ^ lan.cpp:11:5: error: 'n' was not declared in this scope if (n % 4 == 2) out << 4; ^ lan.cpp:11:17: error: 'out' was not declared in this scope if (n % 4 == 2) out << 4; ^ lan.cpp:12:5: error: 'n' was not declared in this scope if (n % 4 == 3) out << 8; ^ lan.cpp:12:17: error: 'out' was not declared in this scope if (n % 4 == 3) out << 8; ^ lan.cpp: At global scope: lan.cpp:13:2: error: expected unqualified-id before 'return' }return 0; ^ lan.cpp:14:1: error: expected declaration before '}' token } ^
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ă.