#2560
bits
Se dă un număr natural N
. Determinați valoarea unor anumiți biți din reprezentarea sa în baza 2.
Balcaniada de Informatică 2018, ziua de antrenament
Problema | bits | Operații I/O |
bits.in /bits.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 128 MB
/
Stivă 32 MB
|
Id soluție | #11395929 | Utilizator | |
Fișier | bits.cpp | Dimensiune | 368 B |
Data încărcării | 27 Octombrie 2018, 14:50 | Scor / rezultat | Eroare de compilare |
bits.cpp:6:1: error: stray '\302' in program int n, b, sol = 0, Max = 0; ^ bits.cpp:6:1: error: stray '\240' in program bits.cpp:6:1: error: stray '\302' in program bits.cpp:6:1: error: stray '\240' in program bits.cpp:6:1: error: stray '\302' in program bits.cpp:6:1: error: stray '\240' in program bits.cpp:8:1: error: stray '\302' in program cin >> n >> b; ^ bits.cpp:8:1: error: stray '\240' in program bits.cpp:8:1: error: stray '\302' in program bits.cpp:8:1: error: stray '\240' in program bits.cpp:8:1: error: stray '\302' in program bits.cpp:8:1: error: stray '\240' in program bits.cpp:9:1: error: stray '\302' in program for(int i = 1; n; i *= 10, n /= b) { ^ bits.cpp:9:1: error: stray '\240' in program bits.cpp:9:1: error: stray '\302' in program bits.cpp:9:1: error: stray '\240' in program bits.cpp:9:1: error: stray '\302' in program bits.cpp:9:1: error: stray '\240' in program bits.cpp:10:1: error: stray '\302' in program if((n % b) > Max) Max = n % b; ^ bits.cpp:10:1: error: stray '\240' in program bits.cpp:10:1: error: stray '\302' in program bits.cpp:10:1: error: stray '\240' in program bits.cpp:10:1: error: stray '\302' in program bits.cpp:10:1: error: stray '\240' in program bits.cpp:10:1: error: stray '\302' in program bits.cpp:10:1: error: stray '\240' in program bits.cpp:10:1: error: stray '\302' in program bits.cpp:10:1: error: stray '\240' in program bits.cpp:10:1: error: stray '\302' in program bits.cpp:10:1: error: stray '\240' in program bits.cpp:10:1: error: stray '\302' in program bits.cpp:10:1: error: stray '\240' in program bits.cpp:11:1: error: stray '\302' in program sol += i * (n % b); ^ bits.cpp:11:1: error: stray '\240' in program bits.cpp:11:1: error: stray '\302' in program bits.cpp:11:1: error: stray '\240' in program bits.cpp:11:1: error: stray '\302' in program bits.cpp:11:1: error: stray '\240' in program bits.cpp:11:1: error: stray '\302' in program bits.cpp:11:1: error: stray '\240' in program bits.cpp:11:1: error: stray '\302' in program bits.cpp:11:1: error: stray '\240' in program bits.cpp:11:1: error: stray '\302' in program bits.cpp:11:1: error: stray '\240' in program bits.cpp:11:1: error: stray '\302' in program bits.cpp:11:1: error: stray '\240' in program bits.cpp:12:1: error: stray '\302' in program } ^ bits.cpp:12:1: error: stray '\240' in program bits.cpp:12:1: error: stray '\302' in program bits.cpp:12:1: error: stray '\240' in program bits.cpp:12:1: error: stray '\302' in program bits.cpp:12:1: error: stray '\240' in program bits.cpp:13:1: error: stray '\302' in program cout << Max << '\n'; ^ bits.cpp:13:1: error: stray '\240' in program bits.cpp:13:1: error: stray '\302' in program bits.cpp:13:1: error: stray '\240' in program bits.cpp:13:1: error: stray '\302' in program bits.cpp:13:1: error: stray '\240' in program bits.cpp:16:1: error: stray '\310' in program Citește mai multe pe Brainly.ro - https://brainly.ro/tema/1013195#readmore ^ bits.cpp:16:1: error: stray '\231' in program bits.cpp:16:1: error: 'Cite' does not name a type
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema bits 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ă.