#2577
Se dau mai multe perechi de forma număr, bit. Afișați pentru fiecare pereche valoarea bitului corespunzător din reprezentarea internă pe 64 de biți a numărului dat.
| Problema | getbit | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64985517 | Utilizator | |
| Fișier | getbit.c | Dimensiune | 392 B |
| Data încărcării | 04 Iulie 2026, 13:53 | Scor/rezultat | 100 puncte |
getbit.c: In function ‘main’: getbit.c:19:23: warning: unused variable ‘v2’ [-Wunused-variable] 19 | int n,x,y, v[100],v2[100]; | ^~ getbit.c:19:16: warning: unused variable ‘v’ [-Wunused-variable] 19 | int n,x,y, v[100],v2[100]; | ^ getbit.c:19:13: warning: unused variable ‘y’ [-Wunused-variable] 19 | int n,x,y, v[100],v2[100]; | ^ getbit.c:19:11: warning: unused variable ‘x’ [-Wunused-variable] 19 | int n,x,y, v[100],v2[100]; | ^ getbit.c:19:9: warning: unused variable ‘n’ [-Wunused-variable] 19 | int n,x,y, v[100],v2[100]; | ^ getbit.c: In function ‘pb2577’: getbit.c:7:6: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%d",&t); | ^~~~~~~~~~~~~~ getbit.c:10:10: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%lld %d", &n,&b); | ^~~~~~~~~~~~~~~~~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 0 | 0.001 secunde | OK. | 10 | 10 | ||
| 1 | 0.002 secunde | OK. | 10 | 10 | ||
| 2 | 0.002 secunde | OK. | 10 | 10 | ||
| 3 | 0.001 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 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema getbit 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ă.