#3349
Se dau numerele naturale b n p. Determinați numărul format din ultimele p cifre ale lui bn.
| Problema | Putere1 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64764373 | Utilizator | |
| Fișier | putere1.cpp | Dimensiune | 371 B |
| Data încărcării | 28 Mai 2026, 15:22 | Scor/rezultat | 100 puncte |
putere1.cpp: In function ‘int main()’: putere1.cpp:10:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 10 | for(i=1; i<=p; i++) | ^~~ putere1.cpp:12:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 12 | while(n!=0) | ^~~~~ putere1.cpp:14:13: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 14 | if(n%2==1) | ^~ putere1.cpp:16:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 16 | b=(b*b)%P; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | OK. | 10 | 10 | Exemplu | |
| 2 | 0.001 secunde | OK. | 10 | 10 | ||
| 3 | 0.002 secunde | OK. | 10 | 10 | ||
| 4 | 0.001 secunde | OK. | 10 | 10 | ||
| 5 | 0.001 secunde | OK. | 10 | 10 | ||
| 6 | 0.001 secunde | OK. | 10 | 10 | ||
| 7 | 0.001 secunde | OK. | 10 | 10 | ||
| 8 | 0.001 secunde | OK. | 10 | 10 | ||
| 9 | 0.001 secunde | OK. | 10 | 10 | ||
| 10 | 0.001 secunde | OK. | 10 | 10 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Putere1 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ă.