#3480
Se dă un număr natural n. Calculați ultima cifră a lui \({9}^{n}\).
| Problema | 9lan | Operații I/O |
9lan.in/9lan.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0.1 MB
|
| Id soluție | #64847260 | Utilizator | |
| Fișier | lan.cpp | Dimensiune | 322 B |
| Data încărcării | 06 Iunie 2026, 16:28 | Scor/rezultat | Eroare de compilare |
lan.cpp: In function ‘int main()’: lan.cpp:6:9: error: ‘cin’ was not declared in this scope 6 | if (cin>>n) | ^~~ lan.cpp:2:1: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’? 1 | #include <fstream> +++ |+#include <iostream> 2 | using namespace std; lan.cpp:10:13: error: ‘cout’ was not declared in this scope 10 | cout<<1; | ^~~~ lan.cpp:10:13: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’? lan.cpp:14:13: error: ‘cout’ was not declared in this scope 14 | cout<<9; | ^~~~ lan.cpp:14:13: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’? lan.cpp:18:13: error: ‘cout’ was not declared in this scope 18 | cout<<1; | ^~~~ lan.cpp:18:13: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema 9lan 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ă.