Detalii evaluare #23181205

Rezumat problemă

Se citesc 3 numere naturale n, a și b. Afișați primele n puteri ale lui 2, în ordine crescătoare, din intervalul [a,b]. Dacă nu există cel puțin n puteri ale lui 2 în interval, atunci se vor afișa cele care există.

Detalii

Problema Putere2Interval Operații I/O tastatură/ecran
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #23181205 Utilizator Andrei Capril (Andrei_Capril)
Fișier putere2interval.cpp Dimensiune 448 B
Data încărcării 29 Mai 2020, 01:06 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

putere2interval.cpp:8:1: error: stray '\302' in program
     int n, a, b, nr=0, i=1;

 ^
putere2interval.cpp:8:1: error: stray '\240' in program
putere2interval.cpp:8:1: error: stray '\302' in program
putere2interval.cpp:8:1: error: stray '\240' in program
putere2interval.cpp:9:1: error: stray '\302' in program
     cout << "n="; cin >> n;

 ^
putere2interval.cpp:9:1: error: stray '\240' in program
putere2interval.cpp:9:1: error: stray '\302' in program
putere2interval.cpp:9:1: error: stray '\240' in program
putere2interval.cpp:10:1: error: stray '\302' in program
     cout << "a="; cin >> a;

 ^
putere2interval.cpp:10:1: error: stray '\240' in program
putere2interval.cpp:10:1: error: stray '\302' in program
putere2interval.cpp:10:1: error: stray '\240' in program
putere2interval.cpp:11:1: error: stray '\302' in program
     cout << "b="; cin >> b;

 ^
putere2interval.cpp:11:1: error: stray '\240' in program
putere2interval.cpp:11:1: error: stray '\302' in program
putere2interval.cpp:11:1: error: stray '\240' in program
putere2interval.cpp:12:1: error: stray '\302' in program
     while((nr<=n) && (pow(2,i)<b))

 ^
putere2interval.cpp:12:1: error: stray '\240' in program
putere2interval.cpp:12:1: error: stray '\302' in program
putere2interval.cpp:12:1: error: stray '\240' in program
putere2interval.cpp:13:1: error: stray '\302' in program
     {

 ^
putere2interval.cpp:13:1: error: stray '\240' in program
putere2interval.cpp:13:1: error: stray '\302' in program
putere2interval.cpp:13:1: error: stray '\240' in program
putere2interval.cpp:14:1: error: stray '\302' in program
         if((pow(2,i)>=a) && (pow(2,i)<=b))

 ^
putere2interval.cpp:14:1: error: stray '\240' in program
putere2interval.cpp:14:1: error: stray '\302' in program
putere2interval.cpp:14:1: error: stray '\240' in program
putere2interval.cpp:14:1: error: stray '\302' in program
putere2interval.cpp:14:1: error: stray '\240' in program
putere2interval.cpp:14:1: error: stray '\302' in program
putere2interval.cpp:14:1: error: stray '\240' in program
putere2interval.cpp:15:1: error: stray '\302' in program
         {

 ^
putere2interval.cpp:15:1: error: stray '\240' in program
putere2interval.cpp:15:1: error: stray '\302' in program
putere2interval.cpp:15:1: error: stray '\240' in program
putere2interval.cpp:15:1: error: stray '\302' in program
putere2interval.cpp:15:1: error: stray '\240' in program
putere2interval.cpp:15:1: error: stray '\302' in program
putere2interval.cpp:15:1: error: stray '\240' in program
putere2interval.cpp:16:1: error: stray '\302' in program
             cout << pow(2,i) << endl;

 ^
putere2interval.cpp:16:1: error: stray '\240' in program
putere2interval.cpp:16:1: error: stray '\302' in program
putere2interval.cpp:16:1: error: stray '\240' in program
putere2interval.cpp:16:1: error: stray '\302' in program
putere2interval.cpp:16:1: error: stray '\240' in program
putere2interval.cpp:16:1: error: stray '\302' in program
putere2interval.cpp:16:1: error: stray '\240' in program
putere2interval.cpp:16:1: error: stray '\302' in program
putere2interval.cpp:16:1: error: stray '\240' in program
putere2interval.cpp:16:1: error: stray '\302' in program
putere2interval.cpp:16:1: error: stray '\240' in program
putere2interval.cpp:17:1: error: stray '\302' in program
             nr++;

 ^
putere2interval.cpp:17:1: error: stray '\240' in program
putere2interval.cpp:17:1: error: stray '\302' in program
putere2interval.cpp:17:1: error: stray '\240' in program
putere2interval.cpp:17:1: error: stray '\302' in program
putere2interval.cpp:17:1: error: stray '\240' in program
putere2interval.cpp:17:1: error: stray '\302' in program
putere2interval.cpp:17:1: error: stray '\240' in program
putere2interval.cpp:17:1: error: stray '\302' in program
putere2interval.cpp:17:1: error: stray '\240' in program
putere2interval.cpp:17:1: error: stray '\302' in program
putere2interval.cpp:17:1: error: stray '\240' in program
putere2interval.cpp:18:1: error: stray '\302' in program
         }

 ^
putere2interval.cpp:18:1: error: stray '\240' in program
putere2interval.cpp:18:1: error: stray '\302' in program
putere2interval.cpp:18:1: error: stray '\240' in program
putere2interval.cpp:18:1: error: stray '\302' in program
putere2interval.cpp:18:1: error: stray '\240' in program
putere2interval.cpp:18:1: error: stray '\302' in program
putere2interval.cpp:18:1: error: stray '\240' in program
putere2interval.cpp:19:1: error: stray '\302' in program
         i++;

 ^
putere2interval.cpp:19:1: error: stray '\240' in program
putere2interval.cpp:19:1: error: stray '\302' in program
putere2interval.cpp:19:1: error: stray '\240' in program
putere2interval.cpp:19:1: error: stray '\302' in program
putere2interval.cpp:19:1: error: stray '\240' in program
putere2interval.cpp:19:1: error: stray '\302' in program
putere2interval.cpp:19:1: error: stray '\240' in program
putere2interval.cpp:20:1: error: stray '\302' in program
     }

 ^
putere2interval.cpp:20:1: error: stray '\240' in program
putere2interval.cpp:20:1: error: stray '\302' in program
putere2interval.cpp:20:1: error: stray '\240' in program
putere2interval.cpp:21:1: error: stray '\302' in program
     return 0;

 ^
putere2interval.cpp:21:1: error: stray '\240' in program
putere2interval.cpp:21:1: error: stray '\302' in program
putere2interval.cpp:21:1: error: stray '\240' in program

Cum funcționează evaluarea?

www.pbinfo.ro permite evaluarea a două tipuri de probleme:

  • probleme la care rezolvarea presupune scrierea unui program complet
  • probleme la care rezolvarea presupune scrierea unei secvențe de program - câteva instrucțiuni, o listă de declarații, una sau mai multe funcții, etc.

Problema Putere2Interval face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:

  • Programul sursă este compilat folosind compilatorul corespunzător. Dacă în urma compilării se obțin erori sau avertismente, acestea sunt afișate în această pagină.
  • Dacă programul a fost compilat, executabilul obținut va fi rulat, furnizându-i-se unul sau mai multe seturi de date de intrare, în concordanță cu restricțiile specifice problemei. Pentru fiecare set de date se obține un anumit punctaj, în raport cu corectitudinea soluției tale.

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ă.