#2580
Se dau: n un număr întreg și b un număr natural. Setați la 0 bitul b al lui n.
| Problema | setbit0 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #50274196 | Utilizator | |
| Fișier | setbit0.cpp | Dimensiune | 144 B |
| Data încărcării | 03 Aprilie 2024, 08:16 | Scor/rezultat | 60 puncte |
setbit0.cpp: In function 'int main()': setbit0.cpp:5:16: warning: format '%u' expects argument of type 'unsigned int*', but argument 2 has type 'long long int*' [-Wformat=] scanf("%u", &n); ^ setbit0.cpp:6:16: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=] scanf("%d", &b); ^ setbit0.cpp:8:16: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'long long int' [-Wformat=] printf("%u", n); ^ setbit0.cpp:5:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%u", &n); ^ setbit0.cpp:6:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &b); ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 0 | 0 secunde | OK. | 10 | 10 | ||
| 1 | 0 secunde | OK. | 10 | 10 | ||
| 2 | 0 secunde | OK. | 10 | 10 | ||
| 3 | 0 secunde | OK. | 10 | 10 | ||
| 4 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
| 5 | 0 secunde | OK. | 10 | 10 | ||
| 6 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
| 7 | 0 secunde | OK. | 10 | 10 | ||
| 8 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
| 9 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
| Punctaj total | 60 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema setbit0 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ă.